Receipts and dispatch timing of transport packets in a video program bearing stream remultiplexer

ABSTRACT

A method and system are provided for remultiplexing program bearing data. The remultiplexing method and system are applicable to MPEG-2 compliant transport streams carrying video programs. A descriptor based system is used for scheduling the timely output of transport packets wherein each descriptor records a dispatch time as well as a receipt time for each transport packet. The receipt time is used for estimating program clock reference adjustments, but final program clock reference adjustment is performed in hardware in relation to the precise output timing of each transport packets. A descriptor and transport packet caching technique is used for decoupling the synchronous receipt and transmission of transport packets from any asynchronous processing performed thereon. The descriptors can also be used for managing scrambling and descrambling control words (encryption and decryption keys). Remultiplexing functions may be distributed across a network. The remultiplexer can furthermore optimize the bandwidth of transport streams by replacing null transport packets with transport packet data to be inserted into the output transport stream. Program data transmitted via asynchronous communication links is re-timed and assistance is provided for outputting program data on such asynchronous communication links to reduce a variation in end-to-end delay incurred by the program data. Remultiplexing and program specific information can be seamlessly dynamically varied without stopping, or introducing a discontinuity in, the flow of outputted transport packets. A technique is also provided for locking multiple internal reference clock generators.

RELATED APPLICATIONS

The subject matter of this application is related to the subject matterof the following patent applications, all of which are commonly assignedto the same assignee as is this application:

(1) U.S. patent application Ser. No. 09/007,334, entitled “Dynamic VideoProgram Bearing Stream Remultiplexer,” filed on even date herewith forRegis Gratacap;

(2) U.S. patent application Ser. No. 09/007,203, entitled “Re-timing ofVideo Program Bearing Streams Transmitted by an AsynchronousCommunication Link,” filed on even data herewith for Regis Gratacap;

(3) U.S. patent application Ser. No. 09/007,211, entitled “BandwidthOptimization of Video Program Bearing Transport Streams,” filed on evendate herewith for Robert Robinett and Regis Gratacap;

(4) U.S. patent application Ser. No. 09/007,210, entitled “NetworkDistributed Remultiplexer for Video Program Bearing Transport Streams,”filed on even date herewith for Robert Robinett, Regis Gratacap andWilliam Slattery;

(5) U.S. patent application Ser. No. 09/007,204, entitled “Remultiplexerfor Video Program Bearing Transport Streams with Assisted Output Timingfor Asynchronous Communication Output,” filed on even data herewith forRegis Gratacap;

(6) U.S. patent application Ser. No. 09/006,964, entitled “Remultiplexerfor Video Program Bearing Transport Streams with Program Clock ReferenceTime Stamp Adjustment,” filed on even date herewith for William Slatteryand Regis Gratacap;

(7) U.S. patent application Ser. No. 09/007,198, entitled “RemultiplexerCache Architecture and Memory Organization for Storing Video ProgramBearing Transport Packets and Descriptors,” filed on even date herewithfor William Slattery and Regis Gratacap;

(8) U.S. patent application Ser. No. 09/007,199, entitled “Scramblingand Descrambling Control Word Control in a Remultiplexer for VideoBearing Transport Streams,” filed on even date herewith for WilliamSlattery and Regis Gratacap; and

(9) U.S. patent application Ser. No. 09/006,963, entitled “ReferenceTime Clock Locking in a Remultiplexer for Video Program BearingTransport Streams,” filed on even date herewith for William Slattery.

The contents of the above-listed patent applications are incorporatedherein by reference.

FIELD OF THE INVENTION

The present invention pertains to communication systems. In particular,the invention pertains to selectively multiplexing bit streamscontaining one or more programs, such as real-time audio-video programs.Program specific and other program related information is adjusted so asto enable identification, extraction and real-time reproduction of theprogram at the receiving end of the bit streams.

BACKGROUND OF THE INVENTION

Recently, techniques have been proposed for efficiently compressingdigital audio-video programs for storage and transmission. See, forexample, ISO\IEC IS 13818-1,2,3: Information Technology-Generic Codingof Moving Pictures and Associated Audio Information: Systems, Video andAudio (“MPEG-2”); ISO\IEC IS 11172-1,2,3: Information Technology-GenericCoding of Moving Pictures and Associated Audio for Digital Storage Mediaat up to about 1.5 Mbits/sec: Systems, Video and Audio (“MPEG-1”); DolbyAC-3; Motion JPEG, etc. Herein, the term program means a collection ofrelated audio-video signals having a common time base and intended forsynchronized presentation, as per MPEG-2 parlance.

MPEG-1 and MPEG-2 provide for hierarchically layered streams. That is,an audio-video program is composed of one or more coded bit streams or“elementary streams” (“ES”) such as an encoded video ES, and encodedaudio ES, a second language encoded audio ES, a closed caption text ES,etc. Each ES, in particular, each of the audio and video ESs, isseparately encoded. The encoded ESs are then combined into a systemslayer stream such as a program stream “PS” or a transport stream “TS”.The purpose of the PS or TS is to enable extraction of the encoded ESsof a program, separation and separate decoding of each ES andsynchronized presentation of the decoded ESs. The TS or PS may beencapsulated in an even higher channel layer or storage format whichprovides for forward error correction.

Elementary Streams

Audio ESs are typically encoded at a constant bit rate, e.g., 384 kbps.Video ESs, on the other hand, are encoded according to MPEG-1 or MPEG-2at a variable bit rate. This means that the number of bits percompressed/encoded picture varies from picture to picture (whichpictures are presented or displayed at a constant rate). Video encodinginvolves the steps of spatially and temporally encoding the videopictures. Spatial encoding includes discrete cosine transforming,quantizing, (zig-zag) scanning, run length encoding and variable lengthencoding blocks of luminance and chrominance pixel data. Temporal codinginvolves estimating the motion of macroblocks (e.g., a 4×4 array ofluminance blocks and each chrominance block overlaid thereon) toidentify motion vectors, motion compensating the macroblocks to formprediction error macroblocks, spatially encoding the prediction errormacroblocks and variable length encoding the motion vectors. Somepictures, called I pictures, are only spatially encoded, whereas otherpictures, such as P and B pictures are both spatially and motioncompensated encoded (i.e., temporally predicted from other pictures).Encoded I pictures typically have more bits than encoded P pictures andencoded P pictures typically have more bits than encoded B pictures. Inany event, even encoded pictures of the same type tend to have differentnumbers of bits.

MPEG-2 defines a buffer size constraint on encoded video ESs. Inparticular, a decoder is presumed to have a buffer with a predefinedmaximum storage capacity. The encoded video ES must not cause thedecoder buffer to overflow (and in some cases, must not cause thedecoder buffer to underflow). MPEG-2 specifically defines the times atwhich each picture's compressed data are removed from the decoder bufferin relation to the bit rate of the video ES, the picture display rateand certain picture reordering constraints imposed to enable decoding ofpredicted pictures (from the reference pictures from which they werepredicted). Given such constraints, the number of bits produced incompressing a picture can be adjusted (as frequently as on a macroblockby macroblock basis) to ensure that the video ES does not cause thevideo ES decoder buffer to underflow or overflow.

Transport Streams

This invention is illustrated herein for TSs. For sake of brevity, thediscussion of PSs is omitted. However, those having ordinary skill inthe art will appreciate the applicability of certain aspects of thisinvention to PSs.

The data of each ES is formed into variable length program elementarystream or “PES” packets. PES packets contain data for only a single ES,but may contain data for more than one decoding unit (e.g., may containmore than one compressed picture, more than one compressed audio frame,etc.). In the case of a TS, the PES packets are first divided into anumber of payload units and inserted into fixed length (188 byte long)transport packets. Each transport packet may carry payload data of onlyone type, e.g., PES packet data for only one ES. Each TS is providedwith a four byte header that includes a packet identifier or “PID.” ThePID is analogous to a tag which uniquely indicates the contents of thetransport packet. Thus, one PID is assigned to a video ES of aparticular program, a second, different PID is assigned to the audio ESof a particular program, etc.

The ESs of each program are encoded in relation to a single encodersystem time clock. Likewise, the decoding and synchronized presentationof the ESs are, in turn, synchronized in relation to the same encodersystem time clock. Thus, the decoder must be able to recover theoriginal encoder system time clock in order to be able to decode each ESand present each decoded ES in a timely and mutually synchronizedfashion. To that end, time stamps of the system time clock, calledprogram clock references or “PCRs,” are inserted into the payloads ofselected transport packets (specifically, in adaption fields). Thedecoder extracts the PCRs from the transport packets and uses the PCRsto recover the encoder system time clock. The PES packets may containdecoding time stamps or “DTSs” and/or presentation time stamps or“PTSs”. A DTS indicates the time, relative to the recovered encodersystem time clock, at which the next decoding unit (i.e., compressedaudio frame, compressed video picture, etc.) should be decoded. The PTSindicates the time, relative to the recovered encoder system time clock,at which the next presentation unit (i.e., decompressed audio frame,decompressed picture, etc.) should be presented or displayed.

Unlike the PS, a TS may have transport packets that carry program datafor more than one program. Each program may have been encoded at adifferent encoder in relation to a different encoder system time clock.The TS enables the decoder to recover the specific system time clock ofthe program which the decoder desires to decode. To that end, the TSmust carry separate sets of PCRs, i.e., one set of PCRs for recoveringthe encoder system time clock of each program.

The TS also carries program specific information or (PSI) in transportpackets. PSI is for identifying data of a desired program or otherinformation for assisting in decoding a program. A program associationtable or “PAT” is provided which is carried in transport packets withthe PID 0×0000. The PAT correlates each program number with the PID ofthe transport packets carrying program definitions for that program. Aprogram definition: (1) indicates which ESs make up the program to whichthe program definition corresponds, (2) identifies the PIDs for each ofthose ESs, (3) indicates the PID of the transport packets carrying thePCRs of that program (4) identifies the PIDs of transport packetscarrying ES specific entitlement control messages (e.g., descrambling ordecryption keys) and other information. Collectively, all programdefinitions of a TS are referred to as a program mapping table (PMT).Thus, a decoder can extract the PAT data from the transport packets anduse the PAT to identify the PID of the transport packets carrying theprogram definition of a desired program. The decoder can then extractfrom the transport packets the program definition data of the desiredprogram and identify the PIDs of the transport packets carrying the ESdata that makes up the desired program and of the transport packetscarrying the PCRs. Using these identified PIDs, the decoder can thenextract from the transport packets of the TSs the ES data of the ESs ofthe desired program and the PCRs of that program. The decoder recoversthe encoder system time clock from the PCRs of the desired program anddecodes and presents the ES data at times relative to the recoveredencoder system time clock.

Other types of information optionally provided in a TS includeentitlement control messages (ECMs), entitlement management messages(EMMs), a conditional access table (CAT) and a network information table(NIT) (the CAT and NIT also being types of PSI). ECMs are ES specificmessages for controlling the ability of a decoder to interpret the ES towhich the ECM pertains. For example, an ES may be scrambled and thedescrambling key or control word may be an ECM. The ECMs associated witha particular ES are placed in their own transport packets and arelabeled with a unique PID. EMMs, on the other hand, are system widemessages for controlling the ability of a set of decoders (which set isin a system referred to as a “conditional access system”) to interpretportions of a TS. EMMs are placed in their own transport packets and arelabeled with a PID unique to the conditional accesses system to whichthe EMMs pertain. A CAT is provided whenever EMMs are present forenabling a decoder to locate the EMMs of the conditional access systemof which the decoder is a part (i.e., of the set of decoders of whichthe decoder is a member). The NIT maintains various network parameters.For example, if multiple TSs are modulated on different carrierfrequencies to which a decoder receiver can tune, the NIT may indicateon which carrier frequency (the TS carrying) each program is modulated.

Like the video ES, MPEG-2 requires that the TS be decoded by a decoderhaving TS buffers of predefined sizes for storing program ES and PSIdata. MPEG-2 also defines the rate at which data flows into and out ofsuch buffers. Most importantly, MPEG-2 requires that the TS not overflowor underflow the TS buffers.

To further prevent buffer overflow or underflow, MPEG-2 requires thatdata transported from an encoder to a decoder experience a constantend-to-end delay, and that the appropriate program and ES bit rate bemaintained. In addition, to ensure that ESs are timely decoded andpresented, the relative time of arrival of the PCRs in the TS should notvary too much from the relative time indicated by such PCRs. Statedanother way, each PCR indicates the time that the system time clock(recovered at the decoder) should have when the last byte containing aportion of the PCR is received. Thus, the time of receipt of successivePCRs should correlate with the times indicated by each PCR.

Remultiplexing

Often it is desired to “remultiplex” TSs. Remultiplexing involves theselective modification of the content of a TS, such as adding transportpackets to a TS, deleting transport packets from a TS, rearranging theordering of transport packets in a TS and/or modifying the datacontained in transport packets. For example, sometimes it is desirableto add transport packets containing a first program to a TS thatcontains other programs. Such an operation involves more steps thansimply adding the transport packets of the first program. In the veryleast, the PSI, such as, the PAT and PMT, must be modified so that itcorrectly references the contents of the TS. However, the TS must befurther modified to maintain the constant end-to-end delay of eachprogram carried therein. Specifically, the bit rate of each program mustnot change to prevent TS and video decoder buffer underflow andoverflow. Furthermore, any temporal misalignment introduced into thePCRs of the TS, for example, as a result of changing the relativespacing/rate of receipt of successive transport packets bearing PCRs ofthe same program, must be removed.

The prior art has proposed a remultiplexer for MPEG-2 TSs. The proposedremultiplexer is a sophisticated, dedicated piece of hardware thatprovides complete synchronicity between the point that each inputtedto-be-remultiplexed TS is received to the point that the finalremultiplexed outputted TS is outputted—a single system time clockcontrols and synchronizes receipt, buffering, modification, transfer,reassembly and output of transport packets. While such a remultiplexeris capable of remultiplexing TSs, the remultiplexer architecture iscomplicated and requires a dedicated, uniformly synchronous platform.

It is an object of the present invention to provide a flexibleremultiplexing architecture that can, for instance, reside on anarbitrary, possibly asynchronous, platform.

A program encoder is known which compresses the video and audio of asingle program and produces a single program bearing TS. As noted above,MPEG-2 imposes very tight constraints on the bit rate of the TS and thenumber of bits that may be present in the video decoder buffer at anymoment of time. It is difficult to encode an ES, in particular a videoES, and ensure that the bit rate remain completely constant from momentto moment. Rather, some overhead bandwidth must be allocated to eachprogram to ensure that ES data is not omitted as a result of the ESencoder producing an unexpected excessive amount of encoded information.On the other hand, the program encoder occasionally does not have anyencoded program data to output at a particular transport packet timeslot. This may occur because the program encoder has reduced the numberof bits to be outputted at that moment to prevent a decoder bufferoverflow. Alternatively, this may occur because the program encoderneeds an unanticipated longer amount of time to encode the ESs andtherefore has no data available at that instant of time. To maintain thebit rate of the TS and prevent a TS decoder buffer underflow, a nulltransport packet is inserted into the transport packet time slot.

The presence of null transport packets in a to-be-remultiplexed TS isoften a constraint that simply must be accepted. It is an object of thepresent invention to optimize the bandwidth of TSs containing nulltransport packets.

Sometimes, the TS or ES data is transferred via an asynchronouscommunication link. It is an object of the present invention to“re-time” such un-timed or asynchronously transferred data. It is alsoan object of the present invention to minimize jitter in transportpackets transmitted from such asynchronous communication links by timingthe transmission of such transport packets.

It is also an object of the present invention to enable the user todynamically change the content remultiplexed into the remultiplexed TS,i.e., in real-time without stopping the flow of transport packets in theoutputted remultiplexed TS.

It is a further object of the present invention to distribute theremultiplexing functions over a network. For example, it is an object toplace one or more TS or ES sources at arbitrary nodes of ancommunications network which may be asynchronous (such as an EthernetLAN) and to place a remultiplexer at another node of such a network.

SUMMARY OF THE INVENTION

These and other objects are achieved according to the present invention.An illustrative application of the invention is the remultiplexing oneor more MPEG-2 compliant transport streams (TSs). TSs are bit streamsthat contain the data of one or more compressed/encoded audio-videoprograms. Each TS is formed as a sequence of fixed length transportpackets. Each compressed program includes data for one or morecompressed elementary streams (ESs), such as a digital video signaland/or a digital audio signal. The transport packets also carry programclock references (PCRs) for each program, which are time stamps of anencoder system time clock to which the decoding and presentation of therespective program is synchronized. Each program has a predetermined bitrate and is intended to be decoded at a decoder having a TS buffer and avideo decoder buffer of predetermined sizes. Each program is encoded ina fashion so as to prevent overflow and underflow of these buffers.Program specific information (PSI) illustratively is also carried inselected transport packets of the TS for assisting in decoding the TS.

According to one embodiment, a remultiplexer node is provided with oneor more adaptors, each adaptor including a cache, a data link controlcircuit connected to the cache and a direct memory access circuitconnected to the cache. The adaptor is a synchronous interface withspecial features. The data link control circuit has an input port forreceiving transport streams and an output port for transmittingtransport streams. The direct memory access circuit can be connected toan asynchronous communication link with a varying end-to-endcommunication delay, such as a bus of the remultiplexer node. Using theasynchronous communication link, the direct memory access circuit canaccess a memory of the remultiplexer node. The memory can store one ormore queues of descriptor storage locations, such as a queue assigned toan input port and a queue assigned to an output port. The memory canalso store transport packets in transport packet storage locations towhich descriptors stored in such descriptor storage locations of eachqueue point. Illustratively, the remultiplexer node includes aprocessor, connected to the bus, for processing transport packets anddescriptors.

When an adaptor is used to input transport streams, the data linkcontrol circuit allocates to each received transport packet to beretained, an unused descriptor in one of a sequence of descriptorstorage locations, of a queue allocated to the input port. The allocateddescriptor is in a descriptor storage location of which the cache hasobtained control. The data link control circuit stores each retainedtransport packet at a transport packet storage location of which thecache has obtained control and which is pointed to by the descriptorallocated thereto. The direct memory access circuit obtains control ofone or more unused descriptor storage locations of the queue in thememory following a last descriptor storage location of which the cachehas already obtained control. The direct memory access circuit alsoobtains control of transport packet locations in the memory to whichsuch descriptors in the one or more descriptor storage locations point.

When an adaptor is used to output transport packets, the data linkcontrol circuit retrieves from the cache each descriptor of a sequenceof descriptor storage locations of a queue assigned to the output port.The descriptors are retrieved from the beginning of the sequence inorder. The data link control circuit also retrieves from the cache thetransport packets stored in transport packet storage locations to whichthe retrieved descriptors point. The data link control circuit outputseach retrieved transport packet in a unique time slot (i.e., onetransport packet per time slot) of a transport stream outputted from theoutput port. The direct memory access circuit obtains from the memoryfor storage in the cache, descriptors of the queue assigned to theoutput port in storage locations following the descriptor storagelocations in which a last cached descriptor of the sequence is stored.The direct memory access circuit also obtains each transport packetstored in a transport packet location to which the obtained descriptorspoint.

According to another embodiment, each descriptor is (also) used torecord a receipt time stamp, indicating when a transport packet isreceived at an input port, or a dispatch time stamp, indicating the timeat which a transport packet is to be transmitted from an output port. Inthe case of transport packets received at an input port, the data linkcontrol circuit records a receipt time stamp in the descriptor allocatedto each received and retained transport packet indicating a time atwhich the transport packet was received. The descriptors are maintainedin order of receipt in the receipt queue. In the case of outputtingtransport packets from an output port, the data link control circuitsequentially retrieves each descriptor from the transmit queue, and thetransport packet to which each retrieved descriptor points. At a timecorresponding to a dispatch time recorded in each retrieved descriptor,the data link control circuit transmits the retrieved transport packetto which each retrieved descriptor points in a time slot of theoutputted transport stream corresponding to the dispatch time recordedin the retrieved descriptor.

Illustratively, the remultiplexer node processor examines eachdescriptor in the receipt queue, as well as other queues containingdescriptors pointing to to-be-outputted transport packets. The processorallocates a descriptor of the transmit queue associated with an outputport from which a transport packet pointed to by each examineddescriptor is to be transmitted (if any). The processor assigns adispatch time to the allocated descriptor of the transmit queue,depending on, for example, a receipt time of the transport packet towhich the descriptor points and an internal buffer delay between receiptand output of the transport packet. The processor furthermore orders thedescriptors of the transmit queue in order of increasing dispatch time.

A unique PCR normalization process is also provided. The processorschedules each transport packet to be outputted in a time slot at aparticular dispatch time, corresponding to a predetermined delay in theremultiplexer node. If the scheduled transport packet contains a PCR,the PCR is adjusted based on a drift of the local reference clock(s)relative to the program of the system time clock from which the PCR wasgenerated, if any drift exists. The data link control circuit, thattransmits such adjusted PCR bearing transport packets, further adjusteach adjusted PCR time stamp based on a difference between the scheduleddispatch time of the transport packet and an actual time at which thetime slot occurs relative to an external clock.

Illustratively, if more than one transport packet is to be outputted inthe same time slot, each such transport packet is outputted in aseparate consecutive time slot. The processor calculates an estimatedadjustment for each PCR in a transport packet scheduled to be outputtedin a time slot other than the time slot as would be determined using thepredetermined delay. The estimated adjustment is based on a differencein output time between the time slot in which the processor has actuallyscheduled the transport packet bearing the PCR to be outputted and thetime slot as determined by the predetermined delay. The processoradjusts the PCRs according to this estimated adjustment.

According to one embodiment, the descriptors are also used forcontrolling scrambling or descrambling of transport packets. In the caseof descrambling, the processor defines a sequence of one or moreprocessing steps to be performed on each transport packet and ordersdescrambling processing within the sequence. The processor storescontrol word information associated with contents of the transportpacket in the control word information storage location of the allocateddescriptors. The data link control circuit allocates descriptors to eachreceived, retained transport packet, which descriptors each include oneor more processing indications and a storage location for control wordinformation. The data link control circuit sets one or more of theprocessing indications of the allocated descriptor to indicate that thenext step of processing of the sequence may be performed on each of theallocated descriptors. A descrambler is provided for sequentiallyaccessing each allocated descriptor. If the processing indications ofthe accessed descriptor are set to indicate that descrambling processingmay be performed on the accessed descriptor (and transport packet towhich the accessed descriptor points), then the descrambler processesthe descriptor and transport packet to which it points. Specifically, ifthe descriptor points to a to-be-descrambled transport packet, thedescrambler descrambles the transport packet using the control wordinformation in the accessed descriptor.

The descrambler may be located on the (receipt) adaptor, in which casethe descrambler processing occurs after processing by the data linkcontrol circuit (e.g., descriptor allocation, receipt time recording,etc.) but before processing by the direct memory access circuit (e.g.,transfer to the memory). Alternatively, the descrambler may be aseparate device connected to the asynchronous communication interface,in which case descrambler processing occurs after processing by thedirect memory access circuit but before processing by the processor(e.g., estimated departure time calculation, PID remapping, etc.). Ineither case, the control word information is a base address of a PIDindex-able control word table maintained by the processor.

In the case of scrambling, the processor defines a sequence of one ormore processing steps to be performed on each transport packet andorders scrambling processing within the sequence. The processorallocates a transmit descriptor of a transmit queue to eachto-be-transmitted transport packet and stores control word informationassociated with contents of the transport packet in the control wordinformation storage location of selected ones of the allocateddescriptors. The processor then sets one or more processing indicationsof the descriptor to indicate that the next step of processing of thesequence may be performed on each of the allocated descriptors. Ascrambler is provided for sequentially accessing each allocateddescriptor. The scrambler processes each accessed descriptor andtransport packet to which the accessed descriptor points, but only ifthe processing indications of the accessed descriptors are set toindicate that scrambling processing may be performed on the accesseddescriptor (and transport packet to which the accessed descriptorpoints). Specifically, if the accessed descriptor points to ato-be-scrambled transport packet, the scrambler scrambles the transportpacket pointed to by the accessed descriptor using the control wordinformation in the accessed descriptor.

The scrambler may be located on the (transmit) adaptor, in which casethe scrambler processing occurs after processing by the direct memoryaccess circuit (e.g., transfer from the memory to the cache, etc.) butbefore processing by the data link control circuit (e.g., output at thecorrect time slot, final PCR correction, etc.). Alternatively, thescrambler may be a separate device connected to the asynchronouscommunication interface, in which case descrambler processing occursafter processing by the processor (e.g., transmit queue descriptorallocation, dispatch time assignment, PCR correction, etc.) but beforeprocessing by the direct memory access circuit. The control wordinformation may be a base address of a PID index-able control word tablemaintained by the processor, as with descrambling. Preferably, however,the control word information is the control word itself, used toscramble the transport packet.

In addition, according to an embodiment, a method is provided forre-timing video program bearing data received via an asynchronouscommunication link. An asynchronous interface (e.g., an Ethernetinterface, ATM interface, etc.) is connected to the remultiplexer nodeprocessor (e.g., via a bus) for receiving a video program bearing bitstream from a communication link having a varying end-to-endtransmission delay. The processor determines a time at which each of oneor more received packets carrying data of the same program of thereceived bit stream should appear in an outputted TS based on aplurality of time stamps of the program carried in the received bitstream. A synchronous interface, such as a transmit adaptor, selectivelytransmits selected transport packets carrying received data in anoutputted TS with a constant end-to-end delay at times that depend onthe determined times.

Illustratively, the remultiplexer node memory stores packets containingdata received from the received bit stream in a receipt queue. Theprocessor identifies each packet containing data of a program stored inthe receipt queue between first and second particular packets containingconsecutive time stamps of that program. The processor determines a(transport) packet rate of the program based on a difference between thefirst and second time stamps. The processor assigns as a transmit timeto each of the identified packets, the sum of a transmit time assignedto the first particular packet and a product of the (transport) packetrate and an offset of the identified packet from the first packet.

According to yet another embodiment, a method is provided fordynamically and seamlessly varying remultiplexing according to a changeduser specification. An interface, such as a first adaptor, selectivelyextracts only particular ones of the transport packets from a TSaccording to an initial user specification for remultiplexed TS content.A second interface, such as a second adaptor, reassembles selected onesof the extracted transport packets, and, transport packets containingPSI, if any, into an outputted remultiplexed TS, according to theinitial user specification for remultiplexed TS content. The secondadaptor furthermore outputs the reassembled remultiplexed TS as acontinuous bitstream. The processor dynamically receives one or more newuser specifications for remultiplexed TS content which specifies one ormore of: (I) different transport packets to be extracted and/or (II)different transport packets to be reassembled, while the first andsecond adaptors extract transport packets and reassemble and output theremultiplexed TS. In response, the processor causes the first and secondadaptors to dynamically cease to extract or reassemble transport packetsaccording to the initial user specification and to dynamically begin toextract or reassemble transport packets according to the new userspecification without introducing a discontinuity in the outputtedremultiplexed transport stream. For example, the processor may generatesubstitute PSI that references different transport packets as per thenew user specification, for reassembly by the second adaptor.

Illustratively, this seamless remultiplexing variation technique can beused to automatically ensure that the correct ES information of eachselected program is always outputted in the remultiplexed outputted TS,despite any changes in the ES make up of that program. A controller maybe provided for generating a user specification indicating one or moreprograms of the inputted TSs to be outputted in the output TS. The firstadaptor continuously captures program definitions of an inputted TS. Theprocessor continuously determines from the captured program definitionswhich elementary streams make up each program. The second adaptoroutputs in the outputted TS each transport packet containing ES data ofeach ES determined to make up each program indicated to be outputted bythe user specification without introducing a discontinuity into theoutputted TS. Thus, even if the PIDs of the ESs that make up eachprogram change (in number or value) the correct and complete ES data foreach program is nevertheless always outputted in the outputted TS.

According to yet another embodiment, a method is provided for optimizingthe bandwidth of a TS which has null transport packets inserted therein.The first interface (adaptor) receives a TS at a predetermined bit rate,which TS includes variably compressed program data bearing transportpackets and one or more null transport packets. Each of the nulltransport packets is inserted into a time slot of the received TS tomaintain the predetermined bit rate of the TS when none of thecompressed program data bearing transport packets are available forinsertion into the received TS at the respective transport packet timeslot. The processor selectively replaces one or more of the nulltransport packets with another to-be-remultiplexed data bearingtransport packet. Such replacement data bearing transport packets maycontain PSI data or even bursty transactional data, which burstytransactional data has no bit rate or transmission latency requirementfor presenting information in a continuous fashion.

Illustratively, the processor extracts selected ones of the transportpackets of the received TS and discards each non-selected transportpacket including each null transport packet. The selected transportpackets are stored in the memory by the processor and first adaptor. Asdescribed above, the processor schedules each of the stored transportpackets for output in an outputted transport stream at a time thatdepends on a time at which each of the stored transport packets arereceived. A second interface (adaptor) outputs each of the storedtransport packets in a time slot that corresponds to the schedule. If notransport packet is scheduled for output at one of the time slots of theoutputted TS, the second adaptor outputs a null transport packet.Nevertheless, null transport packets occupy less bandwidth in theoutputted TS than in each inputted TS.

According to an additional embodiment, a method is provided for timelyoutputting compressed program data bearing bit streams on anasynchronous communication link. A synchronous interface (adaptor)provides a bit stream containing transport packets. The processorassigns dispatch times to each of one or more selected ones of thetransport packets to maintain a predetermined bit rate of a program forwhich each selected transport packet carries data and to incur anaverage latency for each selected transport packet. At times that dependon each of the dispatch times, the asynchronous communication interfacereceives one or more commands and responds thereto by transmitting thecorresponding selected transport packets at approximately the dispatchtimes so as to minimize a jitter of selected transport packets.

Illustratively, the commands are generated as follows. The processorenqueues transmit descriptors containing the above dispatch times, intoa transmit queue. The processor assigns an adaptor of the remultiplexernode to servicing the transmit queue on behalf of the asynchronousinterface. The data link control circuit of the assigned adaptor causeseach command to issue when the dispatch times of the descriptors equalthe time of the reference clock at the adaptor.

Various ones of these techniques may be used to enable networkdistributed remultiplexing. A network is provided with one or morecommunication links, and a plurality of nodes, interconnected by thecommunication links into a communications network. A destination nodereceives a first bit stream containing data of one or more programs viaone of the communications links, the first bit stream having one or morepredetermined bit rates for portions thereof. The destination node canbe a remultiplexer node as described above and in any event includes aprocessor. The processor chooses at least part of the received first bitstream for transmission, and schedules transmission of the chosen partof the first bit stream so as to output the chosen part of the first bitstream in a TS at a rate depending on a predetermined rate of the chosenpart of said first bit stream.

In the alternative, the communication links collectively form a sharedcommunications medium. The nodes are divided into a first set of one ormore nodes for transmitting one or more bit streams onto the sharedcommunications medium, and a second set of one or more nodes forreceiving the transmitted bit streams from the shared communicationsmedium. The nodes of the second set select portions of the transmittedbit streams and transmit one or more remultiplexed TSs as a bit streamcontaining the selected portions. Each of the transmitted remultiplexedTSs are different than the received ones of the transmitted bit streams.A controller node is provided for selecting the first and second sets ofnodes and for causing the selected nodes to communicate the bit streamsvia the shared communication medium according to one of plural differentsignal flow patterns, including at least one signal flow pattern that isdifferent from a topological connection of the nodes to the sharedcommunication medium.

Finally, a method is provided for synchronizing the reference clock ateach of multiple circuits that receive or transmit transport packets ina remultiplexing system. The reference clock at each circuit thatreceives transport packets is for indicating a time at which eachtransport packet is received thereat. The reference clock at eachcircuit that transmits transport packets is for indicating when totransmit each transport packet therefrom. A master reference clock, towhich each other one of the reference clocks is to be synchronized, isdesignated. The current time of the master reference clock isperiodically obtained. Each other reference clock is adjusted accordingto a difference between the respective time at the other referenceclocks and the current time of the master reference clock so as to matcha time of the respective reference clock to a corresponding time of themaster reference clock.

Thus, according to the invention, a more flexible remultiplexing systemis provided. The increased flexibility enhances multiplexing yetdecreases overall system cost.

BRIEF DESCRIPTION OF THE DRAWING

FIG. 1 shows a remultiplexing environment according to anotherembodiment of the present invention.

FIG. 2 shows a remultiplexer node using an asynchronous platformaccording to an embodiment of the present invention.

FIG. 3 shows a flow chart which schematically illustrates how transportpackets are processed depending on their PIDs in a remultiplexing nodeaccording to an embodiment of the present invention.

FIG. 4 shows a network distributed remultiplexer according to anembodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

For sake of clarity, the description of the invention is divided intosections.

Remultiplexer Environment and Overview

FIG. 1 shows a basic remultiplexing environment 10 according to anembodiment of the present invention. A controller 20 providesinstructions to a remultiplexer 30 using, for example, any remoteprocedure call (RPC) protocol. Examples of RPCs that can be used includethe digital distributed computing environment protocol (DCE) and theopen network computing protocol (ONC). DCE and ONC are network protocolsemploying protocol stacks that allow a client process to execute asubroutine either locally on the same platform (e.g., controller 20) oron a remote, different platform (e.g., in remultiplexer 30). In otherwords, the client process can issue control instructions by simplesubroutine calls. The DCE or ONC processes issue the appropriate signalsand commands to the remultiplexer 30 for effecting the desired control.

The controller 20 may be in the form of a computer, such as a PCcompatible computer. The controller 20 includes a processor 21, such asone or more Intel™ Pentium II™ integrated circuits, a main memory 23, adisk memory 25, a monitor and keyboard/mouse 27 and one or more I/Odevices 29 connected to a bus 24. The I/O device 29 is any suitable I/Odevice 29 for communicating with the remultiplexer 30, depending on howthe remultiplexer 30 is implemented. Examples of such an I/O device 29include an RS-422 interface, an Ethernet interface, a modem, and a USBinterface.

The remultiplexer 30 is implemented with one or more networked “blackboxes”. In the example remultiplexer architecture described below, theremultiplexer 30 black boxes may be stand alone PC compatible computersthat are interconnected by communications links such as Ethernet, ATM orDS3 communications links. For example, remultiplexer 30 includes one ormore black boxes which each are stand alone PC compatible computersinterconnected by an Ethernet network (10 BASE-T, 100 BASE-T or 1000BASE-T, etc.).

As shown, one or more to-be-remultiplexed TSs, namely, TS1, TS2 and TS3,are received at the remultiplexer 30. As a result of the remultiplexingoperation of the remultiplexer 30, one or more TSs, namely, TS4 and TS5,are outputted from the remultiplexer 30. The remultiplexed TSs TS4 andTS5 illustratively, include at least some information (at least onetransport packet) from the inputted TSs TS1, TS2 and TS3. At least onestorage device 40, e.g., a disk memory or server, is also provided. Thestorage device 40 can produce TSs or data as inputted,to-be-remultiplexed information for remultiplexing into the outputtedTSs TS4 or TS5 by the remultiplexer 30. Likewise, the storage device 40can store TSs information or data produced by the remultiplexer 30, suchas transport packets extracted or copied from the inputted TSs TS1, TS2or TS3, other information received at the remultiplexer 30 orinformation generated by the remultiplexer 30.

Also shown are one or more data injection sources 50 and one or moredata extraction destinations 60. These sources 50 and destinations 60may themselves be implemented as PC compatible computers. However, thesources 50 may also be devices such as cameras, video tape players,communication demodulators/receivers and the destinations may be displaymonitors, video tape recorders, communications modulators/transmitters,etc. The data injection sources 50 supply TS, ES or other data to theremultiplexer 30, e.g., for remultiplexing into the outputted TSs TS4and/or TS5. Likewise, the data extraction destinations 60 receive TS, ESor other data from the remultiplexer 30, e.g., that is extracted fromthe inputted TSs TS1, TS2 and/or TS3. For example, one data injectionsource 50 may be provided for producing each of the inputted,to-be-remultiplexed TSs, TS1, TS2 and TS3 and one data extractiondestination 60 may be provided for receiving each outputtedremultiplexed TS TS4 and TS5.

The environment 10 may be viewed as a network. In such a case, thecontroller 20, each data injection source 50, storage device 40, dataextraction destination 60 and each “networked black box” of theremultiplexer 30 in the environment 10 may be viewed as a node of thecommunications network. Each node may be connected by a synchronous orasynchronous communication link. In addition, the separation of thedevices 20, 40, 50 and 60 from the remultiplexer 30 is merely for sakeof convenience. In an alternative embodiment, the devices 20, 40, 50 and60 are part of the remultiplexer 30.

Remultiplexer Architecture

FIG. 2 shows a basic architecture for one of the network black boxes ornodes 100 of the remultiplexer 30, referred to herein as a“remultiplexer node” 100. The particular remultiplexer node 100 shown inFIG. 2 can serve as the entire remultiplexer 30. Alternatively, as willbe appreciated from the discussion below, different portions of theremultiplexer node 100 can be distributed in separate nodes that areinterconnected to each other by synchronous or asynchronouscommunication links. In yet another embodiment, multiple remultiplexernodes 100, having the same architecture as shown in FIG. 2, areinterconnected to each other via synchronous or asynchronouscommunication links and can be programmed to act in concert. Theselatter two embodiments are referred to herein as network distributedremultiplexers.

Illustratively, the remultiplexer node 100 is a Windows NT™ compatiblePC computer platform. The remultiplexer node 100 includes one or moreadaptors 110. Each adaptor 110 is connected to a bus 130, whichillustratively is a PCI compatible bus. A host memory 120 is alsoconnected to the bus 130. A processor 160, such as an Intel™ Pentium II™integrated circuit is also connected to the bus 130. It should be notedthat the single bus architecture shown in FIG. 2 may be a simplifiedrepresentation of a more complex multiple bus structure. Furthermore,more than one processor 160 may be present which cooperate in performingthe processing functions described below.

Illustratively, two interfaces 140 and 150 are provided. Theseinterfaces 140 and 150 are connected to the bus 130, although they mayin fact be directly connected to an I/O expansion bus (not shown) whichin turn is connected to the bus 130 via an I/O bridge (not shown). Theinterface 140 illustratively is an asynchronous interface, such as anEthernet interface. This means that data transmitted via the interface140 is not guaranteed to occur at precisely any time and may experiencea variable end-to-end delay. On the other hand, the interface 150 is asynchronous interface, such as a TI interface. Communication on thecommunication link connected to the interface 150 is synchronized to aclock signal maintained at the interface 150. Data is transmitted viathe interface 150 at a particular time and experiences a constantend-to-end delay.

FIG. 2 also shows that the remultiplexer node 100 can have an optionalscrambler/descrambler (which may be implemented as anencryptor/decryptor) 170 and/or a global positioning satellite (GPS)receiver 180. The scrambler/descrambler 170 is for scrambling ordescrambling data in transport packets. The GPS receiver 180 is forreceiving a uniform clock signal for purposes of synchronizing theremultiplexer node 100. The purpose and operation of these devices isdescribed in greater detail below.

Each adaptor 110 is a specialized type of synchronous interface. Eachadaptor 110 has one or more data link control circuits 112, a referenceclock generator 113, one or more descriptor and transport packet caches114, an optional scrambler/descrambler 115 and one or more DMA controlcircuits 116. These circuits may be part of one or more processors.Preferably, they are implemented using finite state automata, i.e., asin one or more ASICs or gate arrays (PGAs, FPGAs, etc.). The purpose ofeach of these circuits is described below.

The reference clock generator 113 illustratively is a 32 bit roll-overcounter that counts at 27 MHZ. The system time produced by the referenceclock generator 113 can be received at the data link control circuit112. Furthermore, the processor 160 can directly access the referenceclock generator 113 as follows. The processor 160 can read the currentsystem time from an 110 register of the reference clock generator 113.The processor 160 can load a particular value into this same I/Oregister of the reference clock generator 113. Finally, the processor160 can set the count frequency of the reference clock generator in anadjustment register so that the reference clock generator 113 counts ata frequency within a particular range.

The purpose of the cache 114 is to temporarily store the next one ormore to-be-outputted transport packets pending output from the adaptor110 or the last one or more transport packets recently received at theadaptor 110. The use of the cache 114 enables transport packets to bereceived and stored or to be retrieved and outputted with minimallatency (most notably without incurring transfer latency across the bus130). The cache 114 also stores descriptor data for each transportpacket. The purpose and structure of such descriptors is described ingreater detail below. In addition, the cache 114 stores a filter mapthat can be downloaded and modified by the processor 160 in normaloperation. Illustratively, the cache 114 may also store control wordinformation for use in scrambling or descrambling, as described ingreater detail below. In addition to the processor 160, the cache 114 isaccessed by the data link control circuit 112, the DMA control circuit116 and the optional scrambler/descrambler 115.

As is well known, the cache memory 114 may posses a facsimile ormodified copy of data in the host memory 120. Likewise, when needed, thecache 114 should obtain the modified copy of any data in the host memoryand not a stale copy in its possession. The same is true for the hostmemory 120. An “ownership protocol” is employed whereby only a singledevice, such as the cache memory 114 or host memory 120, has permissionto modify the contents of a data storage location at any one time.Herein, the cache memory 114 is said to obtain control of a data storagelocation when the cache memory has exclusive control to modify thecontents of such storage locations. Typically, the cache memory 114obtains control of the storage location and a facsimile copy of the datastored therein, modifies its copy but defers writing the modificationsof the data to the host memory until a later time. By implication, whenthe cache memory writes data to a storage location in the host memory,the cache memory 114 relinquishes control to the host memory 120.

The DMA control circuit 116 is for transferring transport packet dataand descriptor data between the host memory 120 and the cache 114. TheDMA control circuit 116 can maintain a sufficient number of transportpackets (and descriptors therefor) in the cache 114 to enable the datalink control circuit 112 to output transport packets in the output TScontinuously (i.e., in successive time slots). The DMA control circuit116 can also obtain control of a sufficient number of descriptor storagelocations, and the packet storage locations to which they point, in thecache 114. The DMA control circuit 116 obtains control of suchdescriptor and transport packet storage locations for the cache 114.This enables continuous allocation of descriptors and transport packetstorage locations to incoming transport packets as they are received(i.e., from successive time slots).

The data link control circuit 112 is for receiving transport packetsfrom an incoming TS or for transmitting transport packets on an outgoingTS. When receiving transport packets, the data link control circuit 112filters out and retains only selected transport packets received fromthe incoming TS as specified in a downloadable filter map (provided bythe processor 160). The data link control circuit 112 discards eachother transport packet. The data link control circuit 112 allocates thenext unused descriptor to the received transport packet and stores thereceived transport packet in the cache 114 for transfer to the transportpacket storage location to which the allocated descriptor points. Thedata link control circuit 112 furthermore obtains the reference timefrom the reference clock generator 113 corresponding to the receipt timeof the transport packet. The data link control circuit 112 records thistime as the receipt time stamp in the descriptor that points to thetransport packet storage location in which the transport packet isstored.

When transmitting packets, the data link control circuit 112 retrievesdescriptors for outgoing transport packets from the cache 114 andtransmits the corresponding transport packets in time slots of theoutgoing TS that occur when the time of the reference clock generator113 approximately equals the dispatch times indicated in the respectivedescriptors. The data link control circuit 112 furthermore performs anyfinal PCR correction in outputted transport packets as necessary so thatthe PCR indicated in the transport packets is synchronized with theprecise alignment of the transport packet in the outgoing TS.

The processor 160 is for receiving control instructions from theexternal controller 20 (FIG. 1) and for transmitting commands to theadaptor 10, and the interfaces, 140 and 150 for purposes of controllingthem. In response, to such instructions, the processor 160 generates aPID filter map and downloads it to the cache 114, or modifies the PIDfilter map already resident in the cache 114, for use by the data linkcontrol circuit 112 in selectively extracting desired transport packets.In addition, the processor 160 generates interrupt receive handlers forprocessing each received transport packet based on its PID. Receiptinterrupt handlers may cause the processor 160 to remap the PID of atransport packet, estimate the departure time of a transport packet,extract the information in a transport packet for further processing,etc. In addition, the processor 160 formulates and executes transmitinterrupt handlers which cause the processor to properly sequencetransport packets for output, to generate dispatch times for eachtransport packet, to coarsely correct PCRs in transport packets and toinsert PSI into an outputted TS. The processor 160 may also assist inscrambling and descrambling as described in greater detail below.

The host memory 120 is for storing transport packets and descriptorsassociated therewith. The host memory 120 storage locations areorganized as follows. A buffer 122 is provided containing multiplereusable transport packet storage locations for use as a transportpacket pool. Descriptor storage locations 129 are organized intomultiple rings 124. Each ring 124 is a sequence of descriptor storagelocations 129 from a starting memory address or top of ring 124-1 to anending memory address or bottom of ring 124-2. One ring 124 is providedfor each outgoing TS transmitted from the remultiplexer node 100 and onering 124 is provided for each incoming TS received at the remultiplexernode 100. Other rings 124 may be provided as described in greater detailbelow.

A queue is implemented in each ring 124 by designating a pointer 124-3to a head of the queue or first used/allocated descriptor storagelocation 129 in the queue and a pointer 124-4 to a tail of the queue orlast used/allocated descriptor storage location 129 in the queue.Descriptor storage locations 129 are allocated for incoming transportpackets starting with the unused/non-allocated descriptor storagelocation 129 immediately following the tail 124-4. Descriptor storagelocations 129 for outgoing transport packets are retrieved from thequeue starting from the descriptor storage location 129 pointed to bythe head 124-3 and proceeding in sequence to the tail 124-4. Wheneverthe descriptor of the descriptor storage location 129 at the end of thering 124-2 is reached, allocation or retrieval of descriptors fromdescriptor storage locations 129 continues with the descriptor of thedescriptor storage location 129 at the top of the ring 124-1.

As shown, each descriptor stored in each descriptor storage location 129includes a number of fields 129-1, 129-2, 129-3, 129-4, 129-5, 129-6,129-7, 129-8, 129-9 and 129-10. Briefly stated, the purpose of each ofthese fields is as follows. The field 129-1 is for storing commandattributes. The processor 160 can use individual bits of the commandattribute field to control the transport packet transmission anddescriptor data retrieval of the adaptor 110. For instance, theprocessor 160 can preset a bit in the field 129-1 of a descriptor in thedescriptor storage location 129 pointed to by the bottom 124-2 of thering 124 to indicate that the descriptor storage location 129 pointed toby the top pointer 124-1 follows the descriptor storage location 129pointed to by the bottom pointer 124-2.

The field 129-2 is for storing software status bits. These bits areneither accessed nor modified by the adaptor 110 and can be used by theprocessor 160 for any purposes not involving the adaptor 110.

The field 129-3 is for storing the number of bytes of a to-be-outputted,outgoing transport packet (typically 188 bytes for MPEG-2 transportpackets but can be set to a larger or smaller number when the descriptorpoints to packets according to a different transport protocol or for“gather” and “scatter” support, where packets are fragmented intomultiple storage locations or assembled from fragments stored inmultiple packet storage locations).

The field 129-4 is for storing a pointer to the transport packet storagelocation to which the descriptor corresponds. This is illustrated inFIG. 2 by use of arrows from the descriptors in descriptor storagelocations 129 in the ring 124 to specific storage locations of thetransport packet pool 122.

The field 129-5 is for storing the receipt time for an incoming receivedtransport packet or for storing the dispatch time of an outgoingto-be-transmitted transport packet.

The field 129-6 is for storing various exceptions/errors which may haveoccurred. The bits of this field may be used to indicate a bus 130error, a data link error on the communication link to which the datalink control circuit 112 is connected, receipt of a short or long packet(having less than or more than 188 bytes), etc.

The field 129-7 is for storing status bits that indicate differentstatus aspects of a descriptor such as whether or not the descriptor isvalid, invalid pointing to an errored packet, etc. For example, supposethat multiple devices must process the descriptor and/or packet to whichit points in succession. In such a case, four status bits are preferablyprovided. The first two of these bits can be set to the values 0,1,2 or3. The value 0 indicates that the descriptor is invalid. The value 1indicates that the descriptor is valid and may be processed by the lastdevice that must process the descriptor and/or packet to which itpoints. The value 2 indicates that the descriptor is valid and may beprocessed by the second to last device that must process the descriptorand/or packet to which it points. The value 3 indicates that thedescriptor is valid and may be processed by the third to last devicethat must process the descriptor and/or packet to which it points. Thelatter two bits indicate whether or not the descriptor has been fetchedfrom the host memory 120 to the cache 114 and whether or not thedescriptor has completed processing at the adaptor 110 and may be storedin the host memory 120. Other status bits may be provided as describedin greater detail below.

The field 129-8 contains a transfer count indicating the number of bytesin a received incoming transport packet.

The field 129-9 is for storing a scrambling/descrambling control word orother information for use in scrambling or descrambling. For example,the processor 160 can store a control word (encryption/decryption key)or base address to a table of control words stored in the cache 114 inthis field 129-9.

Field 129-10 is for storing a scheduled estimated departure time, actualdeparture time or actual receipt time. As described in greater detailbelow, this field is used by the processor 160 for ordering receivedincoming transport packets for output or for noting the receipt time ofincoming transport packets.

Illustratively, one data link control circuit 112, one DMA controlcircuit 116 and one ring 124 is needed for receiving transport packetsat a single input port, and one data link control circuit 112, one DMAcontrol circuit 116 and one ring 124 is needed for transmittingtransport packets from a single output port. Descriptors stored inqueues associated with input ports are referred to herein as receiptdescriptors and descriptors stored in queues associated with outputports are referred to herein as transmit descriptors. As noted below,the input and output ports referred to above may be the input or outputport of the communication link to which the data link control circuit112 is connected or the input or output port of the communication linkof another interface 140 or 150 in the remultiplexer node 100. Theadaptor 110 is shown as having only a single data link control circuit112 and a single DMA control circuit 116. This is merely for sake ofillustration--multiple data link control circuits 112 and DMA controlcircuits 116 can be provided on the same adaptor 110. Alternatively, oradditionally, multiple adaptors 110 are provided in the remultiplexernode 100.

Basic Transport Packet Receipt, Remultiplexing and Transmission

Consider now the basic operation of the remultiplexer node 100. Theoperator is provided with a number of choices in how to operate theremultiplexer node 100. In a first manner of operating the remultiplexernode 100, assume that the operator wishes to selectively combine programinformation of two TSs, namely, TS1 and TS2, into a third TS, namely,TS3. In this scenario, assume that the operator does not initially knowwhat programs, ESs or PIDs are contained in the two to-be-remultiplexedTSs TS1 and TS2. In addition, TS1 illustratively is received at a firstadaptor 110, TS2 illustratively is received at a second adaptor 110 andTS3 illustratively is transmitted from a third adaptor 110 of the sameremultiplexer node 100. As will be appreciated from the descriptionbelow, each of TS1 and TS2 may instead be received via synchronous orasynchronous interfaces at the same node or at different nodes, andselected portions of TS1 and TS2 may be communicated to a third node viaa network of arbitrary configuration for selective combination to formTS3 at the third node.

The operation according to this manner may be summarized as (1)acquiring the content information (program, ES, PAT, PMT, CAT, NIT,etc., and PIDs thereof) of the inputted, to-be-remultiplexed TSs TS1 andTS2; (2) reporting the content information to the operator so that theoperator can formulate a user specification; and (3) receiving a userspecification for constructing the outputted remultiplexed TS TS3 anddynamically constructing the remultiplexed TS TS3 from the content ofthe inputted to-be-remultiplexed TSs TS1 and TS2 according to the userspecification.

To enable acquisition of the content information, the transportprocessor 160 allocates one receipt queue to each of the first andsecond adaptors 110 that receive the TSs TS1 and TS2, respectively. Toacquire the content of the TSs TS1 and TS2, no transport packets arediscarded at the adaptors 110 for TS1 or TS2 initially. Thus, theprocessor 160 loads a filter map into the caches 114 of each of thefirst and second adaptors 110 receiving the TSs TS1 and TS2 causing eachtransport packet to be retained and transferred to the host memory 120.As each transport packet of a TS (e.g., the TS1) is received at itsrespective adaptor 110, the data link control circuit 112 allocates thenext unused descriptor (following the descriptor stored in thedescriptor storage location at the tail 124-4 of the receipt queue), tothe received, incoming transport packet. The data link control circuit112 stores each received transport packet in a transport packet storagelocation of the cache 114 to which the allocated descriptor points.

The DMA control circuit 116 writes each transport packet to itscorresponding storage location of the pool 122 in the host memory 120and writes descriptor data of the descriptors allocated to the transportpackets to their respective descriptor storage locations of the receiptqueue. The DMA control circuit 116 may furthermore obtain control of thenext few non-allocated descriptor storage locations 129 of the receiptqueue (following the storage locations of the sequence of descriptors129 for which the DMA control circuit 116 had obtained controlpreviously), copies of the descriptors stored therein and the transportpacket storage locations to which the descriptors point. Control of suchunused, non allocated descriptors and transport packet storage locationsis provided to the cache 114 for used by the data link control circuit112 (i.e., allocation to future transport packets received from TS1).

After the DMA control circuit 116 writes i≧1 transport packets and dataof descriptors allocated thereto to the pool 122 and the receipt queue,the DMA control circuit 116 generates an interrupt. Illustratively, thenumber i may be selected by the operator using controller 20 and set bythe processor 160. The interrupt causes the processor 160 to execute anappropriate receipt “PID” handler subroutine for each received transportpacket Alternatively, another technique such as polling or a timer basedprocess can be used to initiate the processor 160 to execute a receiptPID handler subroutine for each received transport packet. For sake ofclarity, an 37 interrupt paradigm is used to illustrate the inventionherein. Referring to FIG. 3, the processor 160 illustratively has a setof PID handler subroutines for each adaptor 110 (or other device) thatreceives or transmits a TS during a remultiplexing session. FIG. 3illustrates two types of PID handler subroutine sets, namely, a receiptPID handler subroutine set and a transmit PID handler subroutine set.Each DMA control circuit 116 generates a recognizably differentinterrupt thereby enabling the processor 160 to determine which set ofPID handler subroutines to use. In response to the interrupt by the DMAcontrol circuit 116, the processor 160 executes step S2 according towhich the processor 160 examines the PID of each transport packetpointed to by a recently stored descriptor in the receipt queue of theinterrupting adaptor 110. For each PID, the processor 160 consults atable of pointers to receipt PID handler subroutines 402 specific to theadaptor 110 (or other device) that interrupted the processor 160.

Assume that the first adaptor 110 receiving TS1 interrupts the processor160, in which case the processor 160 determines to consult a table ofpointers to receipt PID handler subroutines 402 specific to the adaptor110 that received the TS TS1. The table of pointers to receipt PIDhandler subroutines includes 8192 entries, including one entry indexedby each permissible PID (which PIDs have 13 bits according to MPEG-2).Each indexed entry contains a pointer to, or address of, RIV0, RIV1, . .. ,RIV8191, a subroutine to be executed by the processor 160. Using thePID of each transport packet, the processor 160 indexes the entry of thetable of pointers to receipt PID handler subroutines 402 in order toidentify the pointer to the subroutine to be executed for thatparticular transport packet.

Each subroutine pointed to by the respective pointer, and executed bythe processor 160, is specifically mapped to each PID by virtue of thepointer table 402 to achieve the user's specification. Each subroutineis advantageously predefined and simply mapped by the pointer table 402according to the user specification. Each subroutine is composed of acollection of one or more basic building block processes. Some examplesof basic building block processes include:

(1) PAT acquisition: Initially, this process is included in thesubroutine pointed to by RIV0, the receive PID handler subroutine forPID 0×0000. In executing this process, the processor 160 illustrativelyextracts the section of the PAT carried in the currently processedtransport packet and loads the PAT section into the PAT maintained inmemory. Note that multiple versions of the PAT may be used as theprograms carried in the TS can change from time to time. The processor160 is capable of identifying different versions of the PAT andseparately aggregating and maintaining a copy of each version of the PATin the host memory 120. The processor 160 is also capable of identifyingwhich version of the PAT is currently in use at any time based oninformation contained in various sections of the PAT. The processor 160also uses information carried in each updated PAT section to identifyprogram numbers of programs carried in the TS at that moment and thePIDs of PMT sections or program definitions for such program numbers.Using such program numbers, the processor 160 can modify the pointertable 402 for the receipt PID handler subroutine to insert pointer forappropriate PIDs (labeling transport packets bearing PMT sections) forexecuting a subroutine containing a process for acquiring PMTsections/program definitions.

(2) PMT section/program definition acquisition: In this process, theprocessor 160 extracts the PMT section or program definition containedin the currently processed transport packet and updates the respectiveportion of the PMT with the extracted program definition or PMT sectiondata. Like the PAT, multiple versions of the PMT may be utilized and theprocessor 160 can determine in which PMT to store the extracted PMTsection or program definition data. The processor 160 may use PMTinformation to update a PID filter map used to discard transport packetsof programs not to be included in the remultiplexed TS, to identifycontrol words for descrambling ESs and to select subroutines forprocessing PCRs contained in transport packets having PIDs as identifiedin the PMT.

(3) PID remapping: This causes the processor 160 to overwrite the PID ofthe corresponding packet with a different PID. This is desirable toensure uniqueness of PID assignment. That is, MPEG-2 requires thattransport packets carrying different contents, e.g., data of differentESs, data of different PSI streams, etc., be labeled with mutuallydifferent PIDs, if such different content carrying transport packets areto be multiplexed into, and carried in, the same outputted remultiplexedTS. Otherwise, a decoder or other device would not be able todistinguish transport packets carrying different kinds of data forextraction, decoding, etc. It is possible that a certain PID is used inTS1 to label transport packets bearing a first type of data and the samePID is used in TS2 to label transport packets bearing a second type ofdata. If the transport packets of the first and second types are to beincluded in the outputted remultiplexed TS TS3, then at least one of thetwo types of transport packets should be re-labeled with a new PID toensure uniqueness.

(4) Transport packet discarding: As the name suggests, the processor 160simply discards the transport packet. To this end, the processor 160deallocates the descriptor pointing to the discarded transport packet.Descriptor deallocation can be achieved by the processor 160 adjustingthe sequence of descriptors resident in the descriptor storage locations129 of the queue to remove the descriptor for the deleted transportpacket (e.g., the processor identifies all of the allocated descriptorsthat follow the descriptor of the to-be-deleted transport packet in thering 124 and moves each to the descriptor storage space of theimmediately preceding descriptor). The deallocation of the descriptorcreates a descriptor storage space 129 in the receipt queue forreallocation.

(5) PCR flag setting: The PMT indicates, for each program, the PIDs ofthe transport packets that carry the PCRs. However, only some of suchtransport packets carry PCRs. This can be easily determined by theprocessor 160 determining if the appropriate indicators in the transportpacket are set (the adaption_field_control bits in the transport packetheader and PCR_flag bit in the adaption field). If the processor 160determines that a PCR is present, the processor 160 sets a PCR flag bitin the attribute field 129-1 of the descriptor 129 associated with therespective packet. The purpose of this attribute flag bit is describedin greater detail below.

In addition, the processor 160 illustratively calculates the currentdrift of the reference clock generators 113 relative to the encodersystem time clock of the program of which the PCR is a sample. Drift maybe determined by the following formula:

drift=ΔRTS12−ΔPCR12;

ΔRTS12=RTS2−RTS1;

and

ΔPCRI2=PCR1−PCR2

where:

ΔPCR12 is a difference in successive PCRs for this program,

PCR2 is the PCR in the currently processed transport packet,

PCR1 is the previously received PCR for this program,

ΔRTS12 is a difference in successive receipt time stamps,

RTS2 is the receipt time stamp recorded for the currently processedtransport packet containing PCR2, and

RTS1 is a previous receipt time stamp for the transport packetcontaining PCR1.

After calculating the drift, PCR1 and RTS1 are set equal to PCR2 andRTS2, respectively. The drift is used for adjusting the PCR (ifnecessary) as described below.

(6) Estimated departure time calculation: According to this process, theprocessor 160 estimates the (ideal) departure time of the transportpacket Illustratively, this process is included in the receive interrupthandler for each received incoming transport packet to be remultiplexedinto an outgoing TS. The estimated departure time can be estimated fromthe receipt time of the transport packet (in the field 129-5) and theknown internal buffering delay at the remultiplexing node 100. Theprocessor 160 writes the expected departure time in the field 129-10.

(7) Scrambling/descrambling control word information insertion:Typically, in either a scrambling or descrambling technique, adynamically varying control word, such as an encryption or decryptionkey, is needed to actually scramble or descramble data in the transportpacket. Common scrambling and descrambling techniques use odd and evenkeys, according to which, one key is used for decrypting ES data and thenext key to be used subsequently is transferred contemporaneously in theTS. A signal is then transmitted indicating that the most recentlytransferred key should now be used. Scrambling/descrambling controlwords can be ES specific or used for a group of ESs (over an entire“conditional access system”). Descrambling or scrambling control wordsmay be maintained in a PID index-able table at the remultiplexer node100. As described in greater detail below, the processor 160 inexecuting this process may insert the base address for the control wordtable, or the control word itself, into the field 129-9 of a descriptor.

Initially, the processor 160 selects a PID handler for acquiring the PATof each received TS TS1 and TS2 and thereafter discarding each processedtransport packet. In the course of receiving the PAT, PIDs of other PSIbearing transport packets, such as program definitions/PMT sections, theNIT, and the CAT, and PIDs of other streams such as ES streams, ECMstreams, EMM streams, etc. are obtained. The receipt PID handlersubroutine for the PID of the PAT illustratively selects receipt PIDhandler subroutines for acquiring the PMT, NIT, CAT, etc. This can beachieved easily by having such subroutines available and simply changingthe pointers of the entries (indexed by appropriate identified PIDs) inthe table 402 to point to such PID handler subroutines. Note that such asimple PID handler subroutine selection process can be dynamicallyeffected even while transport packets are received and processed for TS1and TS2. The advantages of this are described in greater detail below.

Eventually, a sufficient amount of PSI regarding each TS TS1 and TS2 isacquired to enable the operator to create a user specification of theinformation to be outputted in the remultiplexed TS TS3. The processor160 illustratively transmits to the controller 20 the acquired PSIinformation, e.g., using the asynchronous interface 140. Sufficientinformation for selecting a user specification is transmitted to thecontroller 20. This information may be selective, e.g., just a channelmap of each TS showing the program numbers contained therein and thedifferent kinds of ESs (described with descriptive service designationssuch as video, audiol, second audio presentation, closed caption text,etc.) Alternatively, the information may be exhaustive e.g., includingthe PIDs of each program, ECMs of ESs thereof, etc., and the controller20 simply displays the information to the operator in a coherent anduseful fashion.

Using the information provided, the operator generates a userspecification for the outputted to-be-remultiplexed TS TS3. This userspecification may specify:

(1) The program numbers in each TS TS1 and TS2 to be retained andoutputted in the remultiplexed TS, TS3,

(2) ESs of retained programs to be retained or discarded,

(3) ESs, groups of ESs, programs or groups of programs to be descrambledand/or scrambled, and the source of the control words to be used inscrambling each ES, group of ESs, program or groups of programs,

(4) Any new ECMs or EMMs to be injected or included in the outputtedremultiplexed TS TS3, and

(5) Any new PSI information not automatically implicated from the aboveselections such as an NIT or CAT to be placed in the outputted TS TS3,specific PIDs that are to be remapped and the new PIDs to which theyshould be remapped, PIDs assigned to other information (e.g., burstydata, as described below) generated at the remultiplexer node andcarried in the TS TS3, etc.

The user specification is then transmitted from the controller 20 to theremultiplexer node 100, e.g., via the asynchronous interface 140.

The processor 160 receives the user specification and responds byselecting the appropriate receive PID handler subroutines forappropriate PIDs of each received, to-be-remultiplexed TS, TS1 and TS2.For example, for each PID labeling a transport packet containing datathat is to be retained, the processor 160 selects a subroutine in whichthe processor inserts the process for estimating the departure time. Foreach PID labeling a transport packet containing scrambled data, theprocessor 160 selects a subroutine containing a process for selectingthe appropriate control word and inserting it into the descriptorassociated with such a transport packet. For each PID labeling atransport packet containing a PCR, the processor 160 can select asubroutine containing the process for setting the PCR flag and forcalculating the drift, and so on. The dynamic adjustment of userspecification and/or PSI data is described in greater detail below.

The processor 160 allocates a transmit queue to each device thattransmits a remultiplexed TS, i.e., the third adaptor 110 that outputsthe TS TS3. The processor 160 furthermore loads the PID filter maps ineach cache 114 of the first and second adaptors 110 that receive the TSsTS1 and TS2 with the appropriate values for retaining those transportpackets to be outputted in remultiplexed TS TS3, for retaining othertransport packets containing PSI, for keeping track of the contents ofTS1, and TS2 and for discarding each other transport packet.

In addition to selecting receive PID handler subroutines, allocatingtransmit queues and loading the appropriate PID filter mapmodifications, the processor 160 illustratively selects a set oftransmit PID handler subroutines for each adaptor (or other device) thatoutputs a remultiplexed TS. This is shown in FIG. 3. The transmit PIDhandler subroutines are selected on a PID and transmit TS basis. Asabove, in response to receiving an identifiable interrupt (e.g., from adata link control circuit 112 of an adaptor 110 that transmits anoutputted TS, such as TS3) the processor 160 executes step S4. In stepS4, the processor 160 examines descriptors from the receipt queues(and/or possibly other queues containing descriptors of transportpackets not yet scheduled for output) and identifies up to j≧1descriptors pointing to transport packets to be outputted from theinterrupting adaptor 110. The number j may illustratively beprogrammable and advantageously is set equal to the number k oftransport packets transmitted from a specific adaptor 110 from which anoutput TS is transmitted between each time the specific adaptor 110interrupts the processor 160.

In executing step S4, the processor 160 examines each receive queue fordescriptors pointing to transport packets that are destined to thespecific output TS. The processor 160 determines which transport packetsare destined to the output TS by consulting a table of pointers totransmit PID handler subroutines 404. As with the table 402, the table404 includes one entry for, and indexed by, each PID 0×0000 to 0×1FFF.Each indexed entry contains a pointer to, or address of, TIV0, TIV1, . .. , TIV8191, a subroutine to be executed in response to a respectivePID. The table of pointers to transmit PID handler subroutines 404 isformulated by the processor 160 according to the user specificationreceived from the controller 20, and modified as described below.

The following are illustrative processes that can be combined into atransmit PID handler subroutine:

(1) Nothing: If the current transport packet is not to be outputted inthe remultiplexed TS (or other stream) of the device that issued thetransmit interrupt to the processor 160, the PID of such a transportpacket maps to a subroutine containing only this process. According tothis process, the processor 160 simply skips the transport packet anddescriptor therefor. The examined descriptor is not counted as one ofthe j transport packets to be outputted from the specific adaptor 110that interrupted the processor 160.

(2) Order descriptor for transmission: If the current transport packetis to be outputted in the remultiplexed TS (or other stream) of thedevice that issued the transmit interrupt to the processor, the PID ofsuch a transport packet maps to a subroutine containing this process (aswell as possibly others). According to this process, the processor 160allocates a transmit descriptor for this transport packet. The processor160 then copies pertinent information in the receipt descriptor thatpoints to the transport packet to the newly allocated transmitdescriptor. The allocated transmit descriptor is then ordered in theproper sequence within a transmit queue, associated with the device thatrequested the interrupt, for transmission. In particular, the processor160 compares the estimated departure time of the packet, to which thenewly allocated descriptor points, to the actual dispatch time (theactual time that the transport packet will be transmitted) recorded inthe other descriptors in the transmit queue. If possible, the descriptoris placed in the transmit queue before each descriptor with a lateractual dispatch time than the estimated departure time of the descriptorand after each descriptor with an earlier actual dispatch time than theestimated departure time of the descriptor. Such an insertion can beachieved by copying each transmit descriptor, of the sequence oftransmit descriptors with later actual dispatch times than the estimateddispatch time of the to-be-inserted descriptor, to the respectivesequentially next descriptor storage location 129 of the queue. The dataof the allocated transmit descriptor can then be stored in thedescriptor storage location 129 made available by copying the sequence.

(3) Actual dispatch time determination: The processor 160 can determinethe actual dispatch time of the transport packet to which the allocateddescriptor points based on the estimated departure time of the transportpacket. The actual dispatch time is set by determining in whichtransport packet time slot of the outputted remultiplexed TS T3 totransmit the transport packet (to which the newly allocated and insertedtransmit descriptor points). That is, the transport packet time slot ofthe outputted TS T3 nearest in time to the estimated departure time isselected. The transport packet is presumed to be outputted at the timeof the selected transport packet time slot, relative to the internalreference time as established by the reference clock generator(s) 113 ofthe adaptor(s) 110 (which are mutually synchronized as described below).The time associated with the respective transport packet slot time isassigned as the actual dispatch time. The actual dispatch time is thenstored in field 129-5 of the transmit descriptor. As described below,the actual dispatch time is really an approximate time at which the datalink control circuit 112 of the third adaptor 110 (which outputs theremultiplexed TS TS3) submits the corresponding transport packet foroutput. The actual output time of the transport packet depends on thealignment of the transport packet time slots, as established by anexternal clock not known to the processor 160. Additional steps may becarried out, as described below, to dejitter PCRs as a result of thismisalignment.

Consider that the bit rates of the TS from which the packet was received(i.e., TS1 or TS2) may be different from the bit rate of the outputtedTS, namely TS3. In addition, the transport packets will be internallybuffered for a predetermined delay (that depends on the length of thereceipt and transmit queues). Nevertheless, assuming that there is nocontention between transport packets of different received TSs for thesame transport packet slot of the outputted remultiplexed TS TS3, alltransport packets will incur approximately the same latency in theremultiplexer node 100. Since the average latency is the same, no jitteris introduced into the transport packets.

Consider now the case that two transport packets are received at nearlythe same time from different TSs, i.e., TS1 and TS2, and both are to beoutputted in the remultiplexed TS TS3. Both transport packets may havedifferent estimated departure times that nevertheless correspond to (arenearest in time to) the same transport packet time slot of the outputtedremultiplexed TS TS3. The transport packet having the earliest estimateddeparture time (or receipt time) is assigned to the time slot and theactual dispatch time of this time slot. The other transport packet isassigned the next transport packet time slot of the outputtedremultiplexed TS TS3 and the actual dispatch time thereof. Note that thelatency incurred by the transport packet assigned to the next time slotis different from the average latency incurred by other transportpackets of that program. Thus, the processor 160 illustratively takessteps to remove the latency incurred by this transport packet, includingadjusting a PCR of the transport packet (if a PCR is contained therein).

(4) PCR drift and latency adjustment: This process illustratively iscontained in the subroutine pointed to by the pointer of the table 404indexed by the PIDs of transport packets containing PCRs. The processor160 determines that PCR latency adjustment is only necessary if atransport packet is not assigned to the transport packet time slot ofthe outputted remultiplexed TS TS3 nearest in time to the estimateddeparture time of the transport packet (as is done for other transportpackets of that program) and if the PCR flag is set in the respectivereceipt descriptor. PCRs are corrected for the displacement in timeincurred by the assignment to the non-ideal slot. This adjustment equalsthe number of slots from the ideal slot by which the transport packet isdisplaced times the slot time.

All PCR's are adjusted for drift as described below unless the input andoutput TSs are exactly aligned in time or the PCR is received from anasynchronous communication link. In the former case, the drift of theinternal clock does not affect the timing at which PCR's are outputted.In the latter case, a different drift adjustment is used as describedbelow. In all other cases, the time at which received PCR's areoutputted is affected by drift of the reference clock generator 113 ofthe adaptors 110 which received the transport packet and the adaptor 110that transmits the transport packet, relative to the program clock ofthe PCR. That is, the transport packet containing the PCR is stampedwith a receipt time stamp obtained from the reference clock generator113. This receipt time stamp is used to determine the estimateddeparture time and the actual dispatch time. As described in detailbelow, transport packets are dispatched according to their actualdispatch time relative to the reference clock generator 113 on theadaptor 110 that transmits the TS TS3, and all reference clockgenerators 113 of all adaptors 110 are maintained in synchronicity.However, the reference clock generators 113, while all synchronized toeach other, are subject to drift relative to the encoder system timeclock that generated the transport packet and PCR thereof. This driftcan impact the time at which each PCR is outputted from theremultiplexer node 100 in the outputted remultiplexed TS such as TS3.

According to the invention, the remultiplexer node 100 corrects for suchdrift. As noted above, part of the receipt handler subroutine for PCRsof each program is to maintain a current measure of drift. A measure ofdrift of the reference clock generators 113 relative to the encodersystem time clock of each program is maintained. For each PCR, thecurrent drift for the program of the PCR (i.e., between the referenceclock generators 113 and the encoder system time clock of that program)is subtracted from the PCR.

With the above-noted allocation of queues, selection of PID handlersubroutines, and modification of PID filter maps, remultiplexing isperformed as follows. The transport packets of TS1 are received at thedata link control circuit 112 of the first adaptor 110. Likewise, thetransport packets of TS2 are received at the data link control circuit112 of the second adaptor 110. The data link control circuit 112 in eachof the first and second adaptors 110 consults the local PID filter mapstored in the cache 114 thereat and selectively discards each transportpacket having a PID indicating that the transport packet is not to beretained. Each data link control circuit 112 retrieves the nextunused/non-allocated descriptor from the cache 114 and determines thetransport packet storage location associated with the descriptor. (Asnoted above and below, the DMA control circuit 116 continuously obtainscontrol of a sequence of one or more of the next unused, non-allocateddescriptors of the receipt queue assigned to the input port of the datalink control circuit 112 and the transport packet storage locations towhich these descriptors point.) The next unused, non-allocateddescriptor follows the descriptor stored in the descriptor storagelocation 129 pointed to by the tail pointer 129-4, which tail pointer129-4 is available to the data link control circuit 112. (As notedabove, if the tail pointer 129-4 equals the bottom of the ring address129-2, the descriptor pointed to by the tail pointer 129-4 will have theend of descriptor ring command bit set in field 129-7 by the processor160. This will cause the data link control circuit 112 to allocate thedescriptor stored in the descriptor storage location 129 at the top ofthe ring address 129-1, using a wrap-around addressing technique.) Thedata link control circuit 112 obtains the time of the reference clockgenerator 113 corresponding to the time the first byte of the transportpacket is received and stores this value as the receipt time stamp inthe field 129-5 of the allocated descriptor. The data link controlcircuit 112 stores the number of bytes of the received transport packetin the field 129-8. Also, if any errors occurred in receiving thetransport packet (e.g., loss of data link carrier of TS1, short packet,long packet, errored packet, etc.), the data link control circuit 112indicates such errors by setting appropriate exception bits of 129-6.The data link control circuit 112 then sets a bit in the status field129-7 indicating that the descriptor 129 has been processed or processedwith exceptions and stores the transport packet at the transport packetstorage location of cache 114 pointed to by the pointer in field 129-4.(Note that in the case of a long packet, a sequence of more than one ofthe next, unused non-allocated descriptors may be allocated to thereceived transport packet and the excess data stored in the packetstorage locations associated with such descriptors. An appropriategather/scatter bit is set in the attribute field 129-1 of the first ofthe descriptors to indicate that the packet has more data than in thesingle transport packet storage space associated with the first of thedescriptors. A corresponding bit may also be set in the attribute field129-1 of the last of the descriptors to indicate that it is the lastdescriptor of a multi-descriptor transfer. Such a long packet typicallyoccurs when the adaptor receives packets from a stream other than a TS.)The DMA control circuit 116 writes the transport packet to itscorresponding transport packet storage location of transport packet pool122 in the host memory 120. The DMA control circuit 116 also writes dataof the descriptor that points to the written transport packet to therespective descriptor storage location 129 of the receipt queue assignedto the respective adaptor 110. Note that the DMA control circuit 116 canidentify which transport packets to write to the host memory 120 bydetermining which descriptors have the processing completed status bitsin the field 129-7 set, and the transport packet storage locations towhich such descriptors point. Note that the DMA control circuit 116 maywrite data of descriptors and transport packets one by one as each iscompleted. Alternatively, the DMA control circuit 116 may allow acertain threshold number of transport packets and descriptors toaccumulate. The DMA control circuit 116 then writes data of a sequenceof i≧1 multiple completed descriptors and transport packets.

In one embodiment, a scrambler/descrambler circuit 115 is placed on theadaptor 110. In such a case, prior to the DMA control circuit 116writing data of a transport packet to the host memory 120, thescrambler/descrambler circuit 115 descrambles each transport packet forwhich descrambling must be performed. This is described in greaterdetail below.

When the DMA control circuit 116 writes descriptor data and transportpackets to the host memory 130, the DMA control circuit 116 interruptsthe processor 160. Such interrupts may be initiated by the DMA controlcircuit 116 every i≧1 descriptors for which data is written to the hostmemory 130. The interrupt causes the processor 160 to execute one of thereceipt PID handler subroutines for each transport packet which is bothPID and input TS specific. As noted above, the receipt PID handlersubroutines are selected by appropriate alteration of the pointers inthe table 402 so that the processor 160, amongst other things, discardstransport packets not to be outputted in the remultiplexed TS, writes anestimated departure time in the descriptors pointing to transportpackets that are to be outputted and sets the PCR flag bit in thedescriptors pointing to transport packets containing PCRs. In addition,the selected receipt PID handler subroutines preferably cause theprocessor 160 to continuously acquire and update the PSI tables, adjustthe PID filter map and select additional receipt PID handler subroutinesas necessary to effect a certain user specification. For example, a userspecification can specify that a particular program number is to becontinuously outputted in the remultiplexed TS TS3. However, the ESsthat make up this program are subject to change due to, amongst otherthings, reaching an event boundary. Preferably, the processor 160 willdetect such changes in ES make up by monitoring changes to the PAT andPMT and will change the PID filter map and select receipt PID handlersubroutines as necessary to continuously cause the ESs of the selectedprogram to be outputted in the remultiplexed TS TS3, whatever the makeup of that program is from moment to moment.

Contemporaneously while performing the above functions associated withreceiving transport packets, a DMA control circuit 116 and data controllink circuit 112 on the third adaptor 110 also perform certain functionsassociated with transmitting transport packets in TS3. Each time thedata link control circuit 112 of this third adaptor 110 outputs k≧1transport packets, the data link control circuit 112 generates atransmit interrupt. Illustratively k may be selected by the processor160. This transmit interrupt is received at the processor 160 whichexecutes an appropriate transmit PID handler subroutine for theoutputted remultiplexed TS TS3. In particular, the processor 160examines the descriptors at the head of each queue that containsdescriptors pointing to transport packets to be outputted in TS3. Asnoted above, two receipt queues contain descriptors pointing totransport packets to be outputted in TS3, including one receipt queueassociated with the first adaptor 110 (that receives TS1) and onereceipt queue associated with the second adaptor 110 (that receivesTS2). As described below, the processor 160 may allocate additionalqueues containing descriptors pointing to transport packets to beoutputted in TS3. The processor 160 identifies the descriptors pointingto the next j transport packets to be outputted in TS3. This is achievedby executing the transmit PID handler subroutines of the set associatedwith the third adaptor 110 and indexed by the PIDs of the transportpackets in the head of the receipt queues. As noted above, if thetransport packet corresponding to a descriptor in a queue examined bythe processor 160 is not to be outputted from the third adaptor 110(that generated the interrupt), the PID of this transport packet willindex a transmit PID handler subroutine for the third adaptor 110 thatdoes nothing. If the transport packet corresponding to the descriptor inthe queue examined by the processor 160 is to be outputted from thethird adaptor 110 (that generated the interrupt), the PID of thetransport packet will index a pointer to a transmit PID handlersubroutine that will: (1) allocate a transmit descriptor for thetransport packet, (2) order the transmit descriptor in the transmitqueue associated with the third adaptor 110 in the correct order fortransmission, (3) assign an actual dispatch time to the allocateddescriptor and transport packet and (4) perform a coarse PCR correctionon the transport packet for drift and latency, if necessary.Illustratively, the processor 160 examines descriptors in (receipt)queues until j descriptors pointing to transport packets to be outputtedin TS3 or from the third adaptor 110 are identified. The descriptors areexamined in order from head 124-3 to tail 124-4. If multiple queues withcandidate descriptors are available for examination, the processor 160may examine the queues in a round-robin fashion, in order of estimateddeparture time or some other order that may be appropriate consideringthe content of the transport packets to which the descriptors point (asdescribed below).

The DMA control circuit 116 retrieves from the host memory 120 data of asequence of j≧1 descriptors of the queue associated with TS3 or thethird adaptor 110. The descriptors are retrieved from the descriptorstorage locations 129 of the queue in order from head pointer 124-3 totail pointer 124-4. The DMA control circuit 116 also retrieves from thehost memory 120 the transport packets from the transport packet storagelocations of the pool 122 to which each such retrieved descriptorpoints. The DMA control circuit 116 stores such retrieved descriptorsand transport packets in the cache 114.

The data link control circuit 112 sequentially retrieves from the cache114 each descriptor in the transmit queue, in order from the headpointer 124-3, and the transport packet in the transport packet storagelocation to which the descriptor points. When the time of the referenceclock generator 113 of the third adaptor 110 equals the time indicatedin the dispatch time field 129-5 of the retrieved descriptor, the datalink control circuit 112 transmits the transport packet, to which thedescriptor (in the storage location pointed to by the head pointer124-3) points, in TS3. The dispatch time is only the approximatetransmit time because each transport packet must be transmitted inalignment with the transport packet time slot boundaries of TS3. Suchboundaries are set with reference to an external clock not known to theprocessor 160. Note also, that the PCRs of each transport packet may beslightly jittered for the same reason. Accordingly, the data linkcontrol circuit 112 furthermore finally corrects the PCRs according tothe precise transmit time of the transport packet that contains it.Specifically, the precise transmit time is less than a transport packettime off from the estimate. The data link control circuit 112 uses atransport time slot boundary clock, which is previously locked to thetime slot boundaries of TS3, to make the final adjustment to theestimated PCRs (namely, by adding the difference between the dispatchtime and the actual transmission time to the PCR of the transportpacket). Note that the data link control circuit 112 can use the PCRflag bit of the descriptor to determine whether or not a PCR is presentin the transport packet (and thus whether or not to correct it).

After transmitting a transport packet, the data link control circuit 112sets the appropriate status information in field 129-7 of the descriptorthat points to the transmitted transport packet and deallocates thedescriptor. The DMA control circuit 116 then writes this statusinformation into the appropriate descriptor storage location of thetransmit queue.

In another manner of operation, the operator already has fill knowledgeof the contents of the inputted TSs to be remultiplexed. In this case,the operator simply prepares the user specification and transmits theuser specification from the controller 20 to the remultiplexer node 100(or remultiplexer nodes 100 when multiple nodes operate in concert in anetwork distributed remultiplexer 100). Preferably, different kinds ofinformation regarding the content of the inputted to-be-remultiplexedTSs (such as the PAT, PMT, etc.) is nevertheless continuously acquired.This enables instantaneous reporting of the content to the operator (viathe processor 160 and the controller 20), for example, to enablecreation of a modified user specification and to dynamically adjust theremultiplexing according to the modified user specification withoutceasing the input of to-be-remultiplexed TSs, the output of theremultiplexed TS or the remultiplexing processing of the remultiplexer100 noted above.

In addition to the above basic remultiplexing functions, theremultiplexer node 100 can perform more advanced functions. Thesefunctions are described individually below.

Dynamic Remultiplexing and Program Specific Information Insertion

As noted above, the operator can use the controller 20 for generating auser specification specifying programs and ESs to retain or discard,programs or ESs to scramble or unscramble (or both), remapping of PIDs,etc. In addition, the processor 160 preferably continuously acquirescontent information (e.g., data of the PAT, PMT, CAT, NIT, ECM tables,etc.) This enables simply dynamic, real-time or “on the fly”modification of the user specification and seamless alteration of theremultiplexing according to the new user specification. Specifically,the operator can alter the user specification and cause theremultiplexer 30 to seamlessly switch to remultiplexing according to thenew user specification. Nevertheless, the remultiplexer 30 ensures thateach outputted remultiplexed TS is always a continuous bitstreamcontaining an unbroken sequence or train of transport packets. Thus, thecontent of the outputted remultiplexed TS(s) are modified withoutintroducing discontinuities into the outputted remultiplexed TS(s),i.e., no breaks in the train of outputted transport packets, orstoppages in the outputted bit stream, occur.

The above seamless modifications can be affected due to the use of aprogrammable processor 160 which controls the flow of transport packetsbetween input and output adaptors 10 or interfaces 140 and 150 and othercircuits such as the descrambler/scrambler 170. Consider that choosingto retain or discard a different set of ESs can be effected simply bythe processor 160 adjusting the appropriate PID filter maps and PIDhandler subroutines selected by the processor 160 for each PID. Choosingwhether to descramble or scramble certain ESs or programs can beachieved by the processor 160 altering the PID handler subroutinesexecuted in response to the PIDs assigned to such ESs or programs toinclude the appropriate scrambling or descrambling processes (describedabove and below). A different selection of output ports for outputting adifferent combination of outputted remultiplexed TSs can be achieved bythe processor 160 allocating transmit descriptor queues for the newoutput ports, deallocating transmit descriptor queues for unneededoutput ports, generating tables 404 of pointers to transmit PID handlersubroutines for each new output port and discarding each table 404 ofpointers to transmit PID handler subroutines for each deallocatedtransmit queue. In a like fashion, a different selection of input portsmay be achieved by the processor 160 allocating and deallocating receiptqueues and generating and discarding tables 402 of pointers to receiptPID handlers for such allocated and deallocated receipt queues,respectively.

In addition to selecting the correct transport packets for output, theremultiplexer node 100 illustratively also provides the correct PSI foreach outputted remultiplexed TS. This is achieved as follows. Thecontroller 20 (FIG. 2) generates a user specification for the output TS.Consider the above example where the remultiplexer node 100remultiplexes two TSs, namely, TS1 and TS2 to produce a third TS,namely, TS3. Illustratively, Table 1 sets forth the contents of each ofTS1 and TS2.

TABLE 1 TS1 TS2 Pro- Pro- gram ES PID gram ES PID A Video A PID(VA) EVideo E PID(VE) A Audio A PID(AA) E Audio E PID(AE) A Data A PID(DA) PMTProg. Def. E PID(e) PMT Prog. Def. A PID(a) F Video F PID(VF) B Video BPID(VB) F Audio F PID(AF) B Audio B PID(AB) F Data F PID(DF) PMT Prog.Def. B PID(b) PMT Prog. Def. F PID(f) C Video C PID(VC) G Video GPID(VG) C Audio C PID(AC) G Audio 1 G PID(A1G) C Decrypt C PID(ECMC) GAudio 2 G PID(A2G) PMT Prog. Def. C PID(c) G Data G PID(DG) D Video DPID(VD) G Decrypt G PID(ECMG) D Audio 1 D PID(A1D) PMT Prog. Def. GPID(g) D Audio 2 D PID(A2D) PAT PAT2 0x0000 D Data D PID(DD) PMT Prog.Def. D PID(d) PAT PAT 1 0x0000

Preferably, the controller 20 programs the processor 160 to extract theinformation shown in Table 1 using the acquisition process of receivePID handler subroutines described above.

Suppose the user specification specifies that only programs A, B, F andG should be retained and outputted into a remultiplexed outputted TSTS3. The user indicates this specification at the controller 20 (FIG.1), e.g., using the keyboard/mouse 27 (FIG. 1). The controller 20determines whether or not the user specification is valid. Inparticular, the controller 20 determines whether or not each outputremultiplexed TS, such as TS3, has sufficient bandwidth to output all ofthe specified programs A, B, F and G and associated PSI (i.e., programdefinitions a, b, f, g and new, substitute PAT3 to be described below).Such bit rate information can be obtained from the processor 160 if notalready known. For example, the processor can execute a PID handlersubroutine that determines the bit rate (or transport packet rate) ofeach program from receipt time stamps assigned to each transport packetof each program bearing a PCR. As described above, such information isobtained anyway by the processor 160 for purposes of performing PCRadjustment. If the user specification is not valid, the controller 20does not download the user specification. If the specification is valid,the controller 20 downloads the user specification to the processor 160.

Assume that the user specification can be satisfied by the outputbandwidth of TS3. If not already acquired, the processor 160 acquiresthe PAT and PMT of the inputted TSs TS1 and TS2. Based on theinformation in PAT1 and PAT2, the processor 160 constructs a substitutePAT3 including only the entries of PAT1 and PAT2 indicating the PIDs ofprogram definitions a, b, f and g associated with programs A, B, F andG. Again, this may be achieved using an appropriate PID handlersubroutine for the PIDs of PAT1 and PAT2 and is preferably executedcontinuously to ensure that any changes to the programs, as reflected inPAT1 and PAT2, are incorporated into the substitute PAT3. The processor160 generates a sequence of transport packets containing this newsubstitute PAT3 and stores them in the packet buffer 122. The processor160 also generates a PAT queue of descriptors pointing to the transportpackets bearing PAT3, which queue preferably is implemented as a ring124. The PAT descriptor queue for the PAT3 transport packetsadvantageously is dedicated to storing only substitute PAT information.The processor 160 furthermore generates estimated departure times andstores them in the descriptors of the PAT queue that point to the PAT3transport packets.

The processor 160 can now service the PAT3 descriptor queue in the sameway as any of the receipt queues in response to a transmit interrupt.That is, when the data link control circuit 112 transmits k≧1 packetsand interrupts the processor 160, the processor 160 will extractdescriptors from the PAT3 queue as well as the receipt queues.Collectively, all queues containing descriptors pointing toto-be-outputted transport packets, for which transmit descriptors in atransmit queue have not yet been allocated are referred to herein as“connection queues.”The processor 160 then constructs appropriate filtermaps and transfers one filter map to a first adaptor 110 that receivesTS1 and a second filter map to a second adaptor 110 that receives TS2,respectively. For example, the first filter map may indicate to extractand retain transport packets with the PIDs: PID(VA), PID(AA), PID(DA),PID(a), PID(VB), PID(AB) and PID(b) (as well as possibly other PIDscorresponding to PSI in TS1). Likewise, the second filter map mayindicate to extract and retain transport packets with the PIDs: PID(VF),PID(AF), PID(DF), PID(f), PID(VG), PID(A1G), PID(A2G), PID(DG),PID(ECMG) and PID(g) (as well as possibly other PIDs corresponding toPSI in TS2). In response, the first and second data link controlcircuits 112 receiving TS1 and TS2, extract only those transport packetsfrom TS1 and TS2 according to the filter maps provided by the processor160. As noted above, the first and second data link control circuits 112store such extracted packets in a cache 114 and allocate descriptorstherefor. First and second DMA control circuits 116 periodically writethe extracted transport packets and data of descriptors therefor to thehost memory 120. The data of the descriptors written by the first DMAcontrol circuit 116 is stored in respective descriptor storage locations129 of a first receive queue for the first data link control circuit 112and the data of the descriptors written by the second DMA controlcircuit 116 is stored in descriptor storage locations of a secondreceive queue for the second data link control circuit 112.

In addition, a third DMA control circuit 116 retrieves descriptors froma transmit queue associated with TS3, and transport packetscorresponding thereto, and stores them in a cache 114. A third data linkcontrol circuit 112 retrieves each descriptor from the cache 114 andtransmits them in TS3. The third data link control circuit 112 generatesan interrupt after transmitting k≧1 transport packets. This causes theprocessor 160 to access the table of pointers to transmit PID handlersubroutines for the transmit queue associated with the third data linkcontrol circuit 112. In executing the appropriate transmit PID handlersubroutine, the processor 160 allocates unused transmit descriptors ofthe TS3 transmit queue for, and copies pertinent information in suchallocated descriptors from, descriptors in available connection queues,namely, the first receive queue, the second receive queue and the PAT3queue. The transmit descriptors are allocated in the TS3 transmit queuein an order that depends on the estimated dispatch time of the receiptdescriptors.

Note also that any kind of PSI may be dynamically inserted, includingnew program definitions, EMMs, ECMs, a CAT or an NIT.

Consider now a situation where a new user specification is generatedwhile remultiplexing occurs according to a previous user specification.As before, the controller 20 initially verifies that there is sufficientbandwidth to meet the new user specification. If there is, the new userspecification is down loaded to the processor 160. The new userspecification may require that the processor 160 extract differentprograms and ESs, map PIDs differently, or generate: (a) new PSI, (b)transport packets bearing the new PSI, and (c) descriptors pointing tothe transport packets bearing the new PSI. In the case of modifying theprograms or ESs contained in TS3, the processor 160 modifies the PIDfilter maps to retain the to-be-retained transport packets and todiscard the to-be-discarded transport packets according to the new userspecification. The new filter maps are transferred to the respectivecaches 114 which dynamically and immediately switch to extractingtransport packets according to the new user specification. The processor160 also selects appropriate receipt PID handler subroutines for the newto-be-retained transport packets by modifying the pointers of thereceipt PID handler subroutine pointer tables 402 associated with thePIDs of the new, to-be-retained transport packets. Modifications mayalso be made to pointers of the receipt PID handler subroutine pointertables 402 indexed by PIDs of transport packets now to-be-discarded. Inthe case of a new PID remapping, the processor 160 selects appropriatesubroutines to perform the new PID remapping.

Such changes may require the generation of new PSI, e.g., a new PAT. Theprocessor 160 selects an appropriate PID handler subroutine forgenerating the new PSI. For example, in the case of a new PAT, the PIDhandler subroutines may be triggered by the PIDs of the PATs of TS1 andTS2. The processor 160 generates new PSI and inserts the new PSI intotransport packets. Descriptors in a respective PSI queue are allocatedfor such new PSI transport packets. The processor 160 stops servicing(i.e., refreshing and transferring transport packets from) any PSIdescriptor queues pointing to transport packets containing stale PSI andinstead services the new PSI descriptor queues.

As each change, i.e., each newly selected PID handler subroutine, eachPSI insertion modification or each new PID filter map, is available, theappropriate data link control circuit 112 or processor 160 seamlesslychanges its operation. Until such change is effected, the data linkcontrol circuit 112 or processor 160 continues to operate under theprevious user specification. Some care must be taken in ordering wheneach change occurs so that the outputted remultiplexed TS is alwaysMPEG-2 compliant. For example, any changes to PID mapping, PIDfiltering, programs, ESs, ECMs, etc., in the TS, which impact the PMT orPAT are preferably delayed until a new version of the PMT (or specificprogram definitions thereof) and/or PAT can be outputted in the TS andan indication for switching over to the new PMT, program definition orPAT is indicated in the TS. Likewise, if EMMs are included or droppedfor a conditional access system, the introduction of such EMMs isdelayed until a new version of the CAT can be transmitted in the TS.Additional judicious ordering of changes may be desirable for internalprocessing management of resources, such as storing a pointer to areceipt PID handler subroutine in the appropriate receipt PID handlersubroutine pointer table entry indexed by a PID of a transport packetto-be retained (that was previously discarded) prior to altering the PIDfilter map of the respective adaptor 10 for retaining transport packetswith this PID, etc.

The following is an example of modifying the remultiplexing according toa new user specification. Suppose the user provides a new userspecification indicating that programs B and F should be dropped andinstead, programs C and D should be retained. In response, thecontroller 20 first determines if there is sufficient bandwidth in theoutputted remultiplexed TS TS3 to accommodate all of the new programdata, and new PSI that must be generated therefor, in modifying theremultiplexed TS TS3 according to the new user specification. Assumingthat there is, the new user specification is downloaded to theremultiplexer node 100. The processor 160 modifies the PID filter map inthe first adaptor 110 so as to discard transport packets with PIDsPID(VB), PID(AB), PID(b) and retain transport packets with PIDs PID(VC),PID(AC), PID(ECMC), PID(c), PID(VD), PID(A1D), PID(A2D), PID(DD) andPID(d). Likewise, the processor 160 modifies the PID filter map in thesecond adaptor 110 so as to discard transport packets with PIDs PID(VF),PID(AF), PID(DF), and PID(f). The processor 160 selects PID handlersubroutines for the PIDs PID(VC), PID(AC), PID(ECMC), PID(c), PID(VD),PID(AID), PID(A2D), PID(DD) and PID(d), including program definitionupdate processes for each of PIDs PID(c) and PID(d), a control wordupdate process for PID(ECMC), a descrambling control word informationinsertion process for each of the scrambled ESs of program C, e.g.,PID(VC). The processor 160 also generates a different substitute PAT3including the program definitions a, b, c, d, and g, e.g., in the courseof executing PID handler subroutines for PID(0) for each of the firstand second adaptors 110.

Now consider the case where another new user specification is providedindicating that the VA video ES of program A should be scrambled. Again,the controller 20 first determines if there is sufficient bandwidth inTS3 to accommodate ECM bearing transport packets for VA and new programdefinitions for program A. Assuming that there is, the new userspecification is downloaded to the remultiplexer node 100. The processor160 allocates a queue for storing descriptors pointing to transportpackets containing the ECMs of VA. The processor 160 selects anappropriate PID handler subroutine for PID(VA) including inserting ascrambling control word into the descriptors pointing to transportpackets containing VA. The processor 160 also generates transportpackets containing the control words as ECMs for VA and allocatesdescriptors pointing to these transport packets. This may be achievedusing a timer driven interrupt handler subroutine. Alternatively,additional hardware (nor shown) or software executed by the processor160 generates control words periodically and interrupts the processor160 when such control words are ready. The processor 160 responds tosuch interrupts by placing an available control word in one or moretransport packets, allocating ECM descriptors of an ECM queue for suchtransport packets, and loading the new control word into the appropriatecontrol word table. The processor 160 furthermore selects a receive PIDhandler subroutine for PID(a) including a process that extracts theinformation in the program definition a and adds information regardingECMA (e.g., PID(ECMA), the ES that it encrypts, etc.).

Scrambling/Descrambling Control

One problem associated with scrambling and descrambling is the selectionof the correct control word or key for each transport packet. That is,scrambled transport packet data may be scrambled with a PID specificcontrol word or a control word specific to a group of PIDs. A rotatingcontrol word scheme may be used where the control word changes from timeto time. In short, there may be a large number of control words (e.g.,keys) associated with each TS and control words are periodicallychanged. In the case of descrambling, a mechanism must be provided forcontinuously receiving control words for each to-be-descrambled ES orgroup of ESs and for selecting the appropriate control word at eachmoment of time. In the case of scrambling, a mechanism must be providedfor selecting the correct control word for scrambling an ES or group ofESs and for inserting the control word used for scrambling the ESs intothe outputted remultiplexed TS sufficiently in advance of any scrambledES data thereby formed.

The descriptors and their ordering within the receipt and transmitqueues can be used to simplify the scrambling and descrambling of TSs.In particular, each receipt descriptor has a field 129-9 in whichinformation pertinent to scrambling or descrambling can be stored, suchas the control word to be used in scrambling the transport packet or apointer to the appropriate control word table containing control wordsfor use in scrambling or descrambling the transport packet.

Consider first the steps performed in descrambling a transport packet.The TS containing transport packets to be descrambled contains ECM (ESspecific conditional access) and EMM (conditional access specific to awhole group of ESs) bearing transport packets. EMMs are carried intransport packets labeled with PIDs unique to the group of ESs to whichthey correspond and ECMs are carried in transport packets labeled withPIDs unique to the specific ES to which each ECM corresponds. The PIDsof the EMMs can be correlated to the specific groups of ESs to whichthey correspond by reference to the CAT. The PIDs of the ECMs can becorrelated to each specific ES to which they correspond by reference tothe PMT. The processor 160 selects PID handler subroutines for:

(1) recovering each CAT and PMT transmitted in the TS and foridentifying which version of the CAT or PMT is currently being used,

(2) by reference to the PMT, recovering a table of ECMs indexed by thePIDs of the transport packets carrying the ESs to which they correspond.

Next, the processor 160 defines a sequence of processing steps to beperformed on each transport packet and descriptor. That is, theprocessor 160 defines the specific order in which the receipt adaptor110 data link control circuit 112, the (optional) receipt adaptor 110descrambler 115, the receipt adaptor 110 DMA control circuit 116, the(optional) descrambler 170 and the processor 160 can process a receiptdescriptor or packet to which a receipt descriptor points. To this end,the processor 160 may transfer appropriate control information to eachof the devices 112, 115 and 116 for causing them to process thetransport packet and descriptor that points thereto in the specificorder of the defined sequence of processing steps as described below.

If the on adaptor 110 descrambler 115 is used, the order of processingin the sequence is defined as follows. The data link control circuit 112of an adaptor 110 receives transport packets and allocates receiptdescriptors for selected ones of those transport packets not discardedas per the PID filter map described above. After storing each retainedtransport packet in the cache 114, the data link control circuit 112illustratively sets the status bit(s) 129-7 in the descriptor pointingto the transport packet to indicate that the transport packet may now beprocessed by the next device according to the order of the definedsequence of processing steps.

The descrambler 115 periodically examines the cache 114 for the next oneor more descriptors for which the status bit(s) 129-7 are set toindicate that the descrambler 115 has permission to modify the transportpacket. Illustratively, the descrambler 115 accesses the cache 114 afterthe descrambler 115 has processed m≧1 descriptors. The descrambler 115accesses each descriptor of the cache 114 sequentially from thedescriptor previously accessed by the descrambler 115 until m≧1descriptors are accessed or until a descriptor is reached having thestatus bit(s) 129-7 set to indicate that processing of a previous stepis being performed on the descriptor and transport packet to which itpoints according to the order of the defined sequence of processingsteps.

In processing descriptors and transport packets, the descrambler 115uses the PID of the transport packet, to which the currently examineddescriptor points, to index a descrambling map located in the cache 114.Illustratively, the processor 160 periodically updates the descramblingmap in the cache 114 as described below. The location of thedescrambling map is provided by a base address located in the descriptorfield 129-9. Illustratively, the processor 160 loads the base address ofthe descrambling map into the fields 129-9 of each descriptor whenallocating the receipt descriptor queues. The indexed entry of thedescrambling map indicates whether or not the transport packet isscrambled and, if scrambled, one or more control words that can be usedto descramble the transport packet. The indexed entry of thedescrambling map can contain the control words corresponding to the PIDof the transport packet or a pointer to a memory location in which therespective control word is stored. If the indexed entry of thedescrambling map indicates that the transport packet to which theaccessed descriptor points is not to be descrambled, the descrambler 115simply sets the status bit(s) 129-7 of the descriptor to indicate thatthe next processing step, according to the order of the defined sequenceof processing steps, may be performed on the descriptor and transportpacket to which it points.

If the indexed entry of the descrambling map indicates that thetransport packet is to be descrambled, the descrambler 115 obtains thecontrol word corresponding to the PID of the transport packet anddescrambles the transport packet data using the control word. Note thata typical descrambling scheme uses rotating (i.e., odd and even) controlwords as described above.

The correct odd or even control word to use in descrambling a transportpacket is indicated by control bits in the transport packet, such as thetransport_scrambling_control bits. The descrambler 115 uses these bits,as well as the PID of the transport packet, in indexing the correctcontrol word. That is, the map constructed and maintained by theprocessor 160 is indexed by both the PID and the odd/even indicator(s).The descrambler 115 then stores the descrambled transport packet data inthe transport packet storage location pointed to by the currentlyexamined descriptor thereby overwriting the pre-descrambling data of thetransport packet. The descrambler 115 then sets the status bit(s) 129-7of the descriptor to indicate that the next processing step according tothe order of the defined sequence of processing steps may be performedon the descriptor and transport packet to which it points.

The DMA control circuit 116 periodically writes transport packet dataand data of descriptors that point thereto from the cache 114 torespective storage locations 122 and 129 of the host memory 130. In sodoing, the DMA control circuit 116 periodically examines a sequence ofone or more descriptors in the cache 114 that follow (in receipt queueorder) the last descriptor processed by the DMA control circuit 116. Ifthe status bit(s) 129-7 of an examined descriptor indicates thatprocessing by the DMA control circuit 116 may be performed on theexamined descriptor, the DMA control circuit 116 sets an appropriatestatus bit(s) 129-7 in the descriptor indicating that the next step ofprocessing, according to the order of the defined sequence of processingsteps, may be performed on the descriptor and the transport packet towhich it points. The DMA control circuit 116 then writes the data of thedescriptor, and of the transport packet to which it points, to the hostmemory 130. However, if the status bit(s) 129-7 are set to indicate thata processing step that precedes the processing performed by the DMAcontrol circuit 116 is still being performed on the descriptor, the DMAcontrol circuit 116 refrains from processing the descriptor andtransport packet to which it points. Illustratively, when enabled, theDMA control circuit 116 examines descriptors until the DMA controlcircuit 116 writes data of a sequence of i≧1 descriptors, and transportpackets to which such descriptors point, or a descriptor is encounteredhaving status bit(s) 129-7 indicating that a prior processing step,according to the order of the defined sequence of processing steps, isstill being performed on the descriptor. Each time the DMA controlcircuit 116 transfers i≧1 transport packets, the DMA control circuitissues an interrupt.

The processor 160 responds to the interrupt issued by, for example, theDMA control circuit 116, by executing the appropriate receipt PIDhandler subroutine. The processor 160 examines one or more descriptorsof the receipt queue, corresponding to the adaptor 110 from which theinterrupt was received, starting from the last descriptor processed bythe processor 160. Illustratively, the processor 160 only executes theappropriate receipt PID handler subroutine for those descriptors havinga status bit(s) 129-7 set indicating that processing by the processor160 may be performed on the descriptor. Each time the processor 160 isinterrupted, the processor 160 illustratively processes descriptors, andtransport packets to which they point, until PID handler subroutines areexecuted for i≧1 transport packets or until a descriptor is encounteredfor which the appropriate status bit(s) 129-7 is set to indicate thatprocessing of a prior processing step (according to the order of thedefined sequence of processing steps) is still being performed on thedescriptor.

In the course of executing the appropriate receipt PID handlersubroutines, the processor 160 recovers all control words for all ESsand updates the descrambling and control word tables or maps used by thedescrambler 115 (or 170 as described below). In a rotating control wordscheme, the processor 160 maintains multiple (i.e., odd and even) keysfor each PID in the control word table or map. The processor 160 mayalso perform processing for enabling subsequent scrambling ofdescrambled transport packets (described below). After processing thereceipt descriptors, the processor 160 deallocates them by setting theirstatus bit(s) 129-7 to indicate that the descriptor is invalid (and thusthe data link control circuit 112 is the next device to process thedescriptors), erasing or resetting selected fields of the descriptor andadvancing the head pointer 124-3 to the next descriptor storage location129.

Consider now the case where the descrambler 115 is not provided on theadaptor 110 or not used. Instead, a descrambler 170 resident on the bus130 is used. A very similar procedure is carried out as before. However,in this scenario, the order of processing steps of the defined sequenceis changed so that the DMA control circuit 116 processes the descriptors(and their corresponding transport packets) after the data link controlcircuit and before the descrambler and the descrambler 170 processes thedescriptors (and their corresponding transport packets) after the DMAcontrol circuit 116 but before the processor 160. Thus, after the datalink control circuit 112 allocates a descriptor for a transport packetand sets the appropriate status bit(s) 129-7 to enable the next step ofprocessing to be performed thereon, the DMA control circuit 116processes the descriptor and transport packet to which it points. Asnoted above, the DMA control circuit 116, sets the status bit(s) 129-7to indicate that the next step of processing may be performed on thedescriptor and writes the transport packet and descriptor to the hostmemory 130.

The descrambler 170 periodically examines the descriptors in the receiptqueue to identify descriptors that have the status bit(s) 129-7 set toindicate that descrambling processing may be performed on descriptorsand transport packets to which they point (according to the order of thedefined sequence of processing steps). The descrambler 170 processessuch identified transport packets in a similar fashion as discussedabove for the descrambler 115. After processing the transport packets,the descrambler 170 sets one or more status bit(s) 129-7 to indicatethat the next processing step (according to the order of the definedsequence of processing steps) can now be performed on the descriptor andtransport packet to which it points.

The processor 160 performs the above noted processing in response to theinterrupt issued by the DMA control circuit 116, including executing theappropriate receipt PID handler subroutine. Preferably, the queue lengthof the receipt queue associated with the adaptor 110 that interruptedthe processor 160 is sufficiently long relative to the processing timeof the descrambler 170 such that the processor 160 examines andprocesses descriptors that the descrambler 170 had already completedprocessing. In other words, the processor 160 and descrambler 170preferably do not attempt to access the same descriptors simultaneously.Rather, the processor 160 begins to process descriptors at a differentpoint in the receipt queue as the descrambler 170.

Consider now the processing associated with scrambling. As withdescrambling processing, status bit(s) 129-7 in the descriptor are usedto order the processing steps performed on each descriptor and transportpacket to which such descriptors point according to an order of adefined sequence of processing steps. Unlike descrambling, scrambling ispreferably performed after the processor 160 has allocated transmitdescriptors to the to-be-scrambled transport packets. As such, thecontrol word field 129-9 can be used in one of two ways. As indescrambling, an address to the base of a scrambling map may be placedin the control word descriptor field 129-9. Preferably, however, becausescrambling occurs after the processor 160 processes the descriptors inthe transmit queue, the correct control word, itself, is placed into thecontrol word descriptor field 129-9.

Consider first the scrambling processing wherein scrambling is performedby an on transmit adaptor 110 scrambler 115. The processor 160 obtainsECM transport packets containing control words that are preferablyencrypted. These ECM transport packets are enqueued in a respectivecorresponding connection queue and are scheduled for output at thecorrect time. That is, the ECM transport packets are scheduled forinjection into the outputted TS sufficiently in advance of the transportpackets that they descramble to enable a decoder to recover the controlword prior to receiving the transport packets that it descrambles.

At an appropriate time after transmitting the ECM transport packetscontaining a control word, the processor 160 changes the control wordtable to cause data to be encrypted using a new key corresponding to therecently transmitted control word. As transport packets are transmittedfrom an output adaptor, the processor 160 executes transmit PID handlersubroutines associated with the PIDs of the transport packets pointed toby descriptors in examined connection queues. For each suchto-be-scrambled transport packet, the transmit PID handler subroutineincludes a process for inserting control word information into thedescriptor associated with the transport packet. The control wordinformation may simply be the base address of a scrambling map to beused in identifying the control word for use in scrambling the transportpacket. However, the control word information can also be the correctcontrol word to be used in scrambling the transport packet. Theprocessor 160 may also toggle bits in the transport packet, such as thetransport_scrambling_control bits, to indicate which of the mostrecently transmitted control words should be used to decrypt ordescramble the transport packet at the decoder. The processor 160furthermore illustratively sets one or more status bits 129-7 of thenewly allocated transmit descriptor to indicate that the next processingstep (according to the order of the defined sequence of processingsteps) should be performed on the transmit descriptor and the transportpacket to which it points.

The DMA control circuit 116 of the transmit adaptor 110 periodicallyretrieves descriptor data from the transmit queue and transport packetsto which such descriptors point. In so doing, the DMA control circuit116 examines the descriptors in the transmit queue following the lastdescriptor for which the DMA control circuit 116 transferred descriptordata to the cache 114. The DMA control circuit 116 only transfers dataof transmit descriptors for which the status bit(s) 129-7 are set toindicate that processing by the DMA control circuit 116 may now beperformed (according to the order of the defined sequence of processingsteps). For example, the DMA control circuit 116 may examine transmitdescriptors until a certain number k≧1 of transmit descriptors areidentified which the DMA control circuit 116 has permission to processor until a descriptor is identified having status bits 129-7 set toindicate that a previous processing step is still being performed on thetransmit descriptor and transport packet to which it points. Aftertransferring to the cache 114 data of such transmit descriptors, and thetransport packets to which such transmit descriptors point, the DMAcontrol circuit 116 sets the status bit(s) 129-7 of such transferredtransmit descriptors to indicate that the next processing step(according to the order of the defined sequence of processing steps) maybe performed on the transmit descriptors, and the transport packets towhich they point.

Next, the scrambler 115 periodically examines the descriptors in thecache 114 for a sequence of one or more descriptors, and transportpackets to which they point, to process. The scrambler 115 onlyprocesses those accessed descriptors having one or more status bits129-7 set to indicate that the scrambling processing step may beperformed thereon (according to the order of the defined sequence ofprocessing steps). The scrambler 115 accesses the control wordinformation field 129-9 and uses the information therein to scrambleeach to-be-scrambled transport packet. As noted above, the control wordinformation can be used one of two ways. If the control word informationis a base address to a scrambling map, the scrambler 115 uses the baseaddress and PID information of the transport packet to index thescrambling map. The indexed entry of the scrambling map indicateswhether or not the transport packet is to be scrambled, and if so, acontrol word to use in scrambling the transport packet. Alternatively,the control word information in the field 129-9, itself, indicateswhether or not the transport packet is to be scrambled, and if so, thecontrol word to use in scrambling the transport packet. If the transportpacket of the processed descriptor is not to be scrambled, the scrambler115 simply sets the appropriate status bit(s) 129-7 to indicate that thenext processing step (according to the order of the defined sequence ofprocessing steps) may now be performed on the transmit descriptor andthe transport packet to which it points. If the transport packet of theprocessed descriptor is to be scrambled, the scrambler scrambles thetransport packet data first, stores the transport packet in the cache inplace of the unscrambled transport packet and then sets the appropriatestatus bit(s) 129-7.

The data link control circuit 112 periodically examines the transmitdescriptors in the cache 114 for transmit descriptors having one or morestatus bits 129-7 set to indicate that processing by the data linkcontrol circuit 112 may be performed thereon. For such transmitdescriptors, the data link control circuit 112 transmits the transportpackets to which such descriptors point, at approximately the actualdispatch time indicated therein. The data link control circuit 112 thendeallocates the descriptors (and sets the status bits 129-7 to invalid).Illustratively, each time the data link control circuit 112 transmits asequence of k≧1 descriptors, the data link control circuit 112 generatesa transmit interrupt for receipt by the processor 160.

In the case that the scrambler 115 is not present or is not used, thescrambler 170 illustratively is used instead. The sequence of processingsteps set forth above is changed so that the scrambler 170 processeseach transmit descriptor and transport packet to which it points afterthe processor 160 and before the DMA control circuit 116 and the DMAcontrol circuit 116 processes each transmit descriptor the transportpacket to which it points after the scrambler 170 but before the datalink control circuit 110.

Bandwidth Optimization

As noted above, often a program bearing TS has null transport packetsinserted therein. Such null transport packets are present because excessbandwidth typically must be allocated for each program by the programencoder. This is because the amount of encoded data produced for each ESproduced from moment to moment can only be controlled so much. Absentthis “overhead bandwidth” encoded ES data would frequently exceed theamount of bandwidth allocated thereto causing encoded ES data to beomitted from the TS. Alternatively, an ES encoder, especially a video ESencoder, might not always have data available to output when a transportpacket time slot occurs. For example, a particular picture may take anunexpectedly longer time to encode than previously anticipated, therebycausing a delay in production of encoded video ES data. Such time slotsare filled with null transport packets.

Although the presence of null transport packets must be tolerated in theremultiplexer node 100, it is desirable to reduce the number of suchbandwidth wasting null transport packets. However, in so doing, the bitrate of each program should not be varied and the end-to-end delayshould remain constant for such programs. According to one embodiment, atechnique is employed whereby null transport packets are replaced withother to-be-remultiplexed transport packet data, if such other transportpacket data is available. This is achieved as follows.

First consider that the processor 160 can have multiple connectionqueues on hand containing descriptors of to-be-scheduled transportpackets, i.e., descriptors in receipt queues, PSI queues, other dataqueues, etc., not yet transferred to a transmit queue. As noted above,these descriptors may point to transport packets associated with areceived incoming TS or to other program related streams generated bythe processor 160, such as a PAT stream, a PMT stream, an EMM stream, anECM stream, a NIT stream, a CAT stream, etc. However, other kinds ofto-be-scheduled transport packets and descriptors 129 therefor may be onhand such as non-time sensitive, “bursty” or “best effort” private databearing transport packets. For example, such extra transport packets maycontain transactional computer data, e.g., such as data communicatedbetween a web browser and a web server. (The remultiplexer node 100 maybe a server, a terminal or simply an intermediate node in acommunication system connected to the “internet.” Such a connection tothe internet can be achieved using a modem, the adaptor 140 or 150,etc.) Such data does not have a constant end-to-end delay requirement.Rather, such data may be transmitted in bursts whenever there isbandwidth available.

The processor 160 first causes each null transport packet to bediscarded. This can be achieved by the processor 160 using a receive PIDhandler subroutine which discards all null transport packets. Thistechnique illustratively is used when the null transport packets arereceived from a device other than the adaptor 110, such as the interface140 or 150. Alternatively, if the null transport packets are receivedfrom the adaptor 110, the processor 160 may provide a PID filter map tothe data link control circuit 112 which causes each null transportpacket to be discarded. Next, according to the receive PID handlersubroutine, each incoming transport packet that is to be outputted inthe TS is assigned an estimated departure time as a function of thereceipt time of the transport packet (recorded in the descriptortherefor) and an internal buffering delay within the remultiplexer node100. In each respective connection queue containing to-be-scheduledtransport packets, the assigned departure times might not be successivetransport packet transmission times (corresponding to adjacent timeslots) of the outputted TS. Rather, two successive descriptors fortransport packets to be outputted in the same output TS may haveestimated departure times that are separated by one or more transportpacket transmission times (or time slots) of the outputted remultiplexedTS in which the transport packets are to be transmitted.

Preferably, descriptors pointing to program data bearing transportpackets, descriptors pointing to PSI, ECM or EMM bearing transportpackets and descriptors pointing to bursty data are each maintained inmutually separate connection queues. In implementation, connectionqueues are each assigned a servicing priority depending on the type ofdata in the transport packets to which the descriptors enqueued thereinpoint. Preferably, program data received from outside the remultiplexernode (e.g., via a receipt adaptor 110 or an interface 140 or 150) isassigned the highest priority. Connection queues storing PSI, ECM or EMMstreams generated by the remultiplexer node 100 may also be assigned thesame priority. Finally, connection queues with descriptors pointing totransport packets containing bursty data with no specific continuity,propagation delay or bit rate requirement, are assigned the lowestpriority. In addition, unlike program, PSI, ECM and EMM data, noestimated departure time is assigned to, or recorded in the descriptorof, transport packets bearing bursty data.

In executing transmit PID handler subroutines, the processor 160transfers descriptors associated with to-be-scheduled transport packetsfrom their respective connection queues to a transmit queue. In sodoing, the processor 160 preferably services (i.e., examines thedescriptors in) each connection queue of a given priority beforeresorting to servicing connection queues of a lower priority. Inexamining descriptors, the processor 160 determines whether or not anyexamined descriptors of the high priority connection queues (i.e.,containing descriptors of transport packets bearing program PSI, ECM orEMM data) point to transport packets that must be transmitted at thenext actual dispatch time, based on the estimated departure timeassigned to such transport packets. If so, the processor 160 allocates atransmit descriptor for each such transport packet, copies pertinentinformation from the connection queue descriptor into the allocatedtransmit queue descriptor and assigns the appropriate dispatch times toeach transport packet for which a transmit descriptor is allocated. Asnoted above, occasionally two or more transport packets contend for thesame actual departure time (i.e., the same transport packet time slot ofthe outputted remultiplexed TS) in which case, a sequence of transportpackets are assigned to consecutive time slots and actual departuretimes. PCR adjustment for such transport packets is performed, ifnecessary.

At other times, when the processor 160 services the connection queues,no transport packet of the higher priority connection queues has anestimated departure time that would cause the processor 160 to assignthat transport packet to the next available time slot and actualdispatch time of the outputted remultiplexed TS. Ordinarily, this wouldcreate a vacant time slot of the outputted remultiplexed TS. Preferably,however, in this situation, the processor 160 services the lowerpriority connection queues. The processor 160 examines the lowerpriority connection queues (in order from the head pointer 124-3),selectively assigns a transmit descriptor to each of a sequence of oneor more transport packets, to which such examined descriptors point, andcopies pertinent information of the examined descriptors to theallocated transmit descriptors. The processor 160 selectively assignsone of the (otherwise) vacant time slots to each transport packet towhich such examined descriptors point and stores the actual dispatchtime associated with the assigned time slots in the correspondingallocated transmit descriptors.

Occasionally, no transport packets, pointed to by descriptors in a highor low priority connection queue, can be assigned to a time slot of theoutputted remultiplexed TS. This can occur because no high prioritytransport packets have estimated departure times corresponding to theactual dispatch time of the time slot and no bursty data bearingtransport packets are buffered pending transmission at the remultiplexernode 100. Alternatively, bursty data bearing transport packets arebuffered, but the processor 160 chooses not to assign transmitdescriptors therefor at this particular moment of time for reasonsdiscussed below. In such a case, the descriptors in the transmit queuewill have actual transmit times corresponding to a non-continuoussequence of transport packet time slots of the outputted remultiplexedTS. When the data link control circuit 112 of the transmit adaptor 110encounters such a discontinuity, the data link control circuit 112transmits a null transport packet at each vacant time slot to which notransport packet is assigned (by virtue of the transmit descriptoractual dispatch time). For example, assume that the dispatch times oftwo successive descriptors in the transmit queue associated with firstand second transport packets indicate that the first transport packet isto be transmitted at a first transport packet time slot and that thesecond transport packet is to be transmitted at a sixth transport packettime slot. The data link control circuit 112 transmits the firsttransport packet at the first transport packet time slot. At each of thesecond, third, fourth, and fifth transport packet time slots, the datalink control circuit 112 automatically transmits a null transportpacket. At the sixth transport packet time slot, the data link controlcircuit 112 transmits the second transport packet.

Note that bursty or best effort data typically does not have a rigorousreceive buffer constraint. That is, most bursty or best effort datareceivers and receiver applications specify no maximum buffer size, datafill rate, etc. Instead, a transport protocol, such as transmit controlprotocol (TCP) may be employed whereby when a receiver buffer fills, thereceiver simply discards subsequently received data. The receiver doesnot acknowledge receiving the discarded packets and the sourceretransmits the packets bearing the data not acknowledged as received.This effectively throttles the effective data transmission rate to thereceiver. While such a throttling technique might effectively achievethe correct data transmission rate to the receiver it has two problems.First, the network must support two-way communication. Only a fractionof all cable television networks and no direct broadcast satellitenetworks support two-way communication between the transmitter andreceiver (absent a telephone return path). In any event, where two-waycommunication is supported, the return path from the receiver to thetransmitter has substantially less bandwidth than the forward path fromthe transmitter to the receiver and often must be shared amongstmultiple receivers. Thus, an aggressive use of TCP as a throttlingmechanism utilizes a large fraction of the return path which must alsobe used for other receiver to transmitter communications. Moreover, itis undesirable to waste bandwidth of the forward path for transmittingtransport packets that are discarded.

Preferably, the insertion of bursty or best effort data should not causesuch buffers to overflow. Illustratively, the PID handler subroutine(s)can control the rate of inserting bursty data to achieve some averagerate, so as not to exceed some peak rate or even to simply to preventreceiver buffer overflow assuming a certain (or typical) receiver bufferoccupancy and pendency of data therein. Thus, even at times when theprocessor 160 has bursty or best effort data available for insertioninto one or more vacant transport packet time slots (and no other datais available for insertion therein), the processor 160 may choose toinsert bursty data into only some vacant transport packet time slots,choose to insert bursty data into alternate or spaced apart transportpacket time slots or choose not to insert bursty data into any vacanttransport packet time slots, so as to regulate the transmission of datato, or to prevent overflow of, an assumed receiver bursty data buffer.In addition, transport packets destined to multiple different receiversmay themselves be interleaved, regardless of when they were generated,to maintain some data transmission rate to the receiver.

In any event, the remultiplexer node 100 provides a simple method foroptimizing the bandwidth of TSs. All null transport packets in incomingTSs are discarded. If transport packets are available, they are insertedinto the time slots that normally would have been allocated to thediscarded null transport packets. If transport packets are notavailable, gaps are left for such time slots by the normal dispatch timeassignment process. If no transport packet has a dispatch timeindicating that it should be transmitted at the next available time slotof the outputted remultiplexed TS, the data link control circuit 112automatically inserts a null transport packet into such a time slot.

The benefit of such a bandwidth optimization scheme is two-fold. First,a bandwidth gain is achieved in terms of the outputted remultiplexed TS.Bandwidth normally wasted on null transport packets is now used fortransmitting information. Second, best effort or bursty data can beoutputted in the TS without specifically allocating bandwidth (or byallocating much less bandwidth) therefor. For example, suppose anoutputted remultiplexed TS has a bandwidth of 20 Mbits/sec. Four programbearing TSs of 5 Mbits/sec each are to be remultiplexed and outputtedonto the 20 Mbits/sec remultiplexed TS. However, as much as 5% of thebandwidth of each of the four program bearing TSs may be allocated tonull packets. As such, it is possible that up to 1 Mbit/sec may be(nominally) available for communicating best effort or bursty databearing transport packets, albeit without any, or with limited,guarantees of constancy of end-to-end delay.

Re-timing Un-timed Data

As noted above, to-be-remultiplexed program data may be received via theasynchronous interface 140. This presents a problem because theinterface 140, and the communication link to which it attaches, are notdesigned to transmit data at any specific time and tend to introduce avariable end-to-end delay into communicated data. In comparison, anassumption can be made for program data received at the remultiplexernode 100 via a synchronous communication link (such as is attached to areceiving adaptor 110) that all received transport packets thereof willbe outputted without jitter. This is because all such packets incur thesame delay at the remultiplexer node 100 (namely, the internal bufferingdelay), or, if they do not (as a result of time slot contention, asdescribed above), the additional delay is known and the PCRs areadjusted to remove any jitter introduced by such additional delays. Inaddition, the PCRs are furthermore corrected for drift of the internalclock mechanism relative to the system time clock of each program andfor the misalignment between scheduled output time of PCRs and actualoutput time relative to the slot boundaries of the outputted TS.However, in the case of transport packets received from the interface140, the transport packets are received at the remultiplexer node 100 ata variable bit rate and at non-constant, jittered times. Thus, if theactual receipt times of the transport packet is used as a basis forestimating the departure of the transport packet, the jitter willremain. Jittered PCRs not only cause decoding and presentationdiscontinuities at the decoder, they cause buffer overflow andunderflow. This is because the bit rate of each program is carefullyregulated assuming that the data will be removed from the decoder bufferfor decoding and presentation relative to the system time clock of theprogram.

According to an embodiment, these problems are overcome as follows. Theprocessor 160 identifies the PCRs of each program of the received TS.Using the PCRs, the processor 160 determines the piece-wise transportpacket rate of transport packets of each program between pairs of PCRs.Given the transport packet rate of each (interleaved) sequence oftransport packets of each program, the processor 160 can assignestimated departure times based on the times at which each transportpacket should have been received.

Illustratively, as the interface 140 receives program data, the receivedprogram data is transferred from the interface 140 to the packet buffers122 of the host memory 120. Specifically, the interface 140 storesreceived program data in some form of a receipt queue. Preferably, thereceived program data is in transport packets.

The interface 140 periodically interrupts the processor 160 when itreceives data. The interface 140 may interrupt the processor 160 eachtime it receives any amount of data or may interrupt the processor 160after receiving a certain amount of data. As with the adaptor 110, areceipt PID handler subroutine pointer table 402 is specially devisedfor the interface 140. The subroutines pointed to by the pointers may besimilar in many ways to the subroutines pointed to by the pointers inthe receipt PID handler subroutine pointer table associated with areceive adaptor 110. However, the subroutines are different in at leastthe following ways. First, the asynchronous interface 140 might notallocate descriptors having the format shown in FIG. 2 to receivedprogram data and might not receive program data in transport packets.For example, the program data may be PES packet data or PS pack data. Insuch a case, the subroutines executed by the processor 160 for PIDs ofretained transport packets illustratively include a process forinserting program data into transport packets. In addition, a processmay be provided for allocating a receipt descriptor of a queue assignedto the adaptor 140 to each received transport packet. The processor 160stores in the pointer field 129-4 of each allocated descriptor a pointerto the storage location of the corresponding transport packet.Illustratively, the actual receipt time field 129-5 is initially leftblank.

Each transport packet containing a PCR furthermore includes thefollowing process. The first time a PCR bearing transport packet isreceived for any program, the processor 160 obtains a time stamp fromthe reference clock generator 113 of any adaptor 110 (or any otherreference clock generator 113 that is synchronously locked to thereference clock generators 113 of the adaptors 110). As described below,the reference clocks 113 are synchronously locked. The obtained timestamp is assigned to the first ever received PCR bearing transportpacket of a program as the receipt time of this transport packet. Notethat other to-be-remultiplexed transport packets may have been receivedprior to this first received PCR bearing transport packet. The knowninternal buffering delay at the remultiplexer node 100 may be added tothe receipt time stamp to generate an estimated departure time which isassigned to the transport packet (containing the first ever received PCRof a particular program).

After the second successive transport packet bearing a PCR for aparticular program is received, the processor 160 can estimate thetransport packet rate between PCRs of that program received via theasynchronous interface 140. This is achieved as follows. The processor160 forms the difference between the two successive PCRs of the program.The processor then divides this difference by the number of transportpackets of the same program between the transport packet containing thefirst PCR and the transport packet containing the second PCR of theprogram. This produces the transport packet rate for the program. Theprocessor 160 estimates the departure time of each transport packet of aprogram between the PCRs of that program by multiplying the transportpacket rate for the program with the offset or displacement of each suchtransport packet from the transport packet containing the first PCR. Theoffset is determined by subtracting the transport packet queue positionof the transport packet bearing the first PCR from the transport packetqueue position for which an estimated departure time is beingcalculated. (Note that the queue position of a transport packet isrelative to all received transport packets of all received streams.) Theprocessor 160 then adds the estimated departure time assigned to thetransport packet containing the first PCR to the product thus produced.The processor 160 illustratively stores the estimated departure time ofeach such transport packet in the field 129-10 of the descriptor thatpoints thereto.

After assigning an estimated departure time stamp to the transportpackets of a program, the processor 160 may discard transport packets(according to a user specification) that will not be outputted in a TS.The above process is then continuously repeated for each successive pairof PCRs of each program carried in the TS. The data of the descriptorswith the estimated departure times may then be transferred to theappropriate transmit queue(s) in the course of the processor 160executing transmit PID handler subroutines. Note also that initiallysome transport packets may be received for a program prior to receivingthe first PCR of that program. For these transport packets only, thetransport packet rate is estimated as the transport packet rate betweenthe first and second PCR of that program (even though these packets arenot between the first and second PCR's). The estimated departure time isthen determined as above.

As with PCRs received from a synchronous interface such as an adaptor110, PCRs received via the asynchronous interface 140 are corrected fordrift between each program clock and the local reference clocks 113 usedto assign estimated receipt time stamps and to output transport packets.Unlike transport packets received from an adaptor 110, the transportpackets received from the interface 140 do not have actual receipt timestamps recorded therefor. As such, there is no reference clockassociated with each transport packet from which drift can accurately bemeasured. Instead, the processor 160 uses a measure of the transmitqueue length or current delay therein in the remultiplexer node 100 toestimate drift. Ideally, the transmit queue length should not vary froma predetermined known delay in the remultiplexer node 100. Any variationin transmit queue length is an indication of drift of the referenceclock generator(s) 113 of the adaptor(s) 110 relative to the programclocks of the programs. As such, the processor 160 adjusts a measure ofdrift upwards or downwards depending on the difference between thecurrent transmit queue length and the expected, ideal transmit queuelength. For example, each time a transmit descriptor is allocated to atransport packet, the processor 160 measures the current transmit queuelength and subtracts it from the ideal transmit queue length in theremultiplexer node 100. The difference is the drift. The drift thuscalculated is used to adjust the PCRs and estimated departure times ofthe transport packets that carry such PCRs. That is, the drift thuscalculated is subtracted from the PCR of a transport packet received viathe asynchronous interface which is placed into the later time slot thanthe time slot corresponding to the estimated departure time of thetransport packet. Likewise, the drift may be subtracted from theestimated departure time of the PCR bearing transport packet prior toassignment of an actual dispatch time. Note that this estimated drift isonly used for transport packets received from the asynchronous interface140 and not other transport packets received via a synchronous interfacesuch as the adaptor 110.

Now consider the problem of contention. When two (or more) receivedtransport packets contend for assignment to the same transport packettime slot (and actual dispatch time) of the outputted remultiplexed TS,one transport packet is assigned to the time slot and the other isassigned to the next time slot. If the other transport packet contains aPCR, the PCR is adjusted by the number of time slots it is displacedfrom its ideal time slot to reflect the assignment to a later time slot.

Assisted Output Timing

As noted above, the interface 140 does not receive transport packets atany particular time. Likewise, the interface 140 does not transmittransport packets at any particular time. However, even though theinterface 140, and the communication link to which it is attached, donot provide a constant end-to-end delay, it is desirable to reduce thevariation in end-to-end delay as much as possible. The remultiplexernode 100 provides a manner for minimizing such variations.

According to an embodiment, the processor 160 allocates a transmitdescriptor of a transmit queue assigned to the interface 140 for eachtransport packet to be outputted via the interface 140. This may beachieved using an appropriate set of transmit PID handler subroutinesfor the transmit queue assigned to the output port of the interface 140.The processor 160 furthermore assigns an adaptor 110 for managing theoutputting of data from this interface 140. Although the transmit queueis technically “assigned” to the interface 140, the DMA control circuit116 of the adaptor 110 assigned to managing the output from theinterface 140 actually obtains control of the descriptors of thedescriptor queue assigned to the interface 140. The data link controlcircuit 112 accesses such descriptors, as described below, which may bemaintained in the cache 114. Thus, the set of transmit PID handlersubroutines assigned to this queue, and executed by the processor 160,is actually triggered by an interrupt generated by the data link controlcircuit 112 which examines the queue.

As above, in response to the interrupt, the processor 160 examines theto-be-scheduled descriptors, i.e., in connection queues, selects one ormore descriptors of these connection queues to be outputted from theoutput port of interface 140 and allocates transmit descriptors for theselected descriptors of the connection queues at the tail of thetransmit queue associated with the output port of the interface 140.Unlike the outputting of transport packets described above, theprocessor 160 may also gather the transport packets associated with theselected descriptors of the connection queues and actually physicallyorganize them into a queue-like buffer, if such buffering is necessaryfor the interface 140.

As above, the DMA control circuit 116 obtains control of a sequence ofone or more descriptors, associated with the output port of theinterface 140, following the last descriptor of which the DMA controlcircuit 116 obtained control. (Note that it is irrelevant whether or notthe transport packets corresponding to the descriptors are retrieved.Because the data link control circuit 112 controls the outputting oftransport packets at the interface 114, no transport packets areoutputted from the output port connected to that data link interface112. Alternatively, the data link control circuit 112 can operateexactly as described above, thereby producing a mirror copy of theoutputted TS. In such a case, a second copy of each transport packet,accessible by the adaptor 110, must also be provided.) As above, thedata link control circuit 112 retrieves each descriptor from the cacheand determines, based on the indicated dispatch time recorded in field129-5, when the corresponding transport packet is to be transmittedrelative to the time indicated by the reference clock generator 113.Approximately when the time of the reference clock generator 113 equalsthe dispatch time, the data link control circuit 112 generates aninterrupt to the processor 160 indicating that the transport packetshould be transmitted now. This can be the same interrupt as generatedby the data link control circuit 112 when it transmits k≧1 transportpackets. However, the interrupt is preferably generated every k=1transport packets. In response, the processor 160 examines theappropriate table of pointers to transmit PID handler subroutines andexecute the correct transmit PID handler subroutine. In executing thetransmit PID handle subroutine, the processor 160 issues a command orinterrupt for causing the interface 140 to transmit a transport packet.This causes the very next transport packet to be transmitted from theoutput port of the interface 140 approximately when the current time ofthe reference clock generator 113 matches the dispatch time written inthe descriptor corresponding to the transport packet. Note that some busand interrupt latency will occur between the data link control circuit112 issuing the interrupt and the interface 140 outputting the transportpacket. In addition, some latency may occur on the communication link towhich the interface 140 is attached (because it is busy, because of acollision, etc.) To a certain extent, an average amount of such latencycan be accommodated through judicious selection of dispatch times of thetransport packets by the processor 160. Nevertheless, the outputting oftransport packets can be fairly close to the correct time, albeit lessclose than as can be achieved using the adaptor 110 or interface 150.The processor 160 furthermore transfers one or more descriptors to thetransmit queue assigned to the output port of the interface 140 asdescribed above.

Inter-Adaptor Reference Clock Locking

A particular problem in any synchronous system employing multiple clockgenerators is that the time or count of each generator is not exactlythe same as each other clock generator. Rather, the count of each clockgenerator is subject to drift (e.g., as a result of manufacturingtolerance, temperature, power variations, etc.). Such a concern is alsopresent in the environment 10. Each remultiplexer node 100, datainjector 50, data extractor 60, controller 20, etc. may have a referenceclock generator, such as the reference clock generator 113 of theadaptor(s) 110 in the remultiplexer node 100. It is desirable to lockthe reference clock generators of at least each node 50, 60 or 100 inthe same TS signal flow path so that they have the same time.

In a broadcast environment, it is useful to synchronize all equipmentthat generates, edits or transmits program information. In analogbroadcasting, this may be achieved using a black burst generator or aSMPTE time code generator. Such synchronization enables seamlesssplicing of real-time video feeds and reduces noise associated withcoupling asynchronous video feeds together.

In the remultiplexer node 100, the need for synchronization is even moreimportant. This is because received transport packets are scheduled fordeparture based on one reference clock and actually retrieved fordispatch based on a second reference clock. It is assumed that anylatency incurred by transport packets in the remultiplexer node 100 isidentical. However, this assumption is only valid if there is onlynegligible drift between the reference clock according to which packetdeparture is estimated and the reference clock according to whichtransport packets are actually dispatched.

According to an embodiment, multiple techniques are provided forlocking, i.e., synchronizing, reference clock generators 113. In eachtechnique, the time of each “slave” reference clock generator isperiodically adjusted in relation to a “master” reference clockgenerator.

According to a first technique, one reference clock generator 113 of oneadaptor 110 is designated as a master reference clock generator. Eachother reference clock generator 113 of each other adaptor 110 isdesignated as a slave reference clock generator. The processor 160periodically obtains the current system time of each reference clockgenerator 113, including the master reference clock generator and theslave reference clock generators. Illustratively, this is achieved usinga process that “sleeps” i.e., is idle for a particular period of time,wakes up and causes the processor 160 to obtain the current time of eachreference clock generator 113. The processor 160 compares the currenttime of each slave reference clock generator 113 to the current time ofthe master reference clock generator 113. Based on these comparisons,the processor 160 adjust each slave reference clock generator 113 tosynchronize them in relation to the master reference clock generator113. The adjustment can be achieved simply by reloading the referenceclock generators 113, adding an adjusted time value to the system timeof the reference clock generator 113 or (filtering and) speeding-up orslowing-down the pulses of the voltage controlled oscillator thatsupplies the clock pulses to the counter of the reference clockgenerator 113. The last form of adjustment is analogous to aphase-locked loop feedback adjustment described in the MPEG-2 Systemsspecification.

Consider now the case where the master reference clock generator and theslave reference clock generator are not located in the same node, butrather are connected to each other by a communication link. For example,the master reference clock generator may be in a first remultiplexernode 100 and the slave reference clock generator may be in a secondremultiplexer node 100, where the first and second remultiplexer nodesare connected to each other by a communication link extending betweenrespective adaptors 110 of the first and second remultiplexer nodes 100.Periodically, in response to a timer process, the processor 160 issues acommand for obtaining the current time of the master reference clockgenerator 113. The adaptor 110 responds by providing the current time tothe processor 160. The processor 160 then transmits the current time toeach other slave reference clock via the communication link. The slavereference clocks are then adjusted, e.g., as described above.

It should be noted that any time source or time server can be used asthe master reference clock generator. The time of this master referenceclock generator is transmitted via the dedicated communication link witha constant end-to-end delay to each other node containing a slavereference clock.

If two or more nodes 20, 40, 50, 60 or 100 of a remultiplexer 30 areseparated by a large geographical distance, it might not be desirable tosynchronize the reference clock generators of each node to the referenceclock generator of any other node. This is because any signaltransmitted on a communication link is subject to some finitepropagation delay. Such a delay causes a latency in the transmission oftransport packets, especially transport packets bearing synchronizingtime stamps. Instead, it might be desirable to use a reference clocksource more equally distant from each node of the remultiplexer 30. Asis well known, the U.S. government maintains both terrestrial andsatellite reference clock generators. These sources reliably transmitthe time on well known carrier signals. Each node, such as theremultiplexer node 100, may be provided with a receiver, such as a GPSreceiver 180, that is capable of receiving the broadcasted referenceclock. Periodically, the processor 160 (or other circuitry) at each node20, 40, 50, 60 or 100 obtains the reference clock from the receiver 180.The processor 160 may transfer the obtained time to the adaptor 110 forloading into the reference clock generator 113. Preferably, however, theprocessor 160 issues a command to the adaptor 110 for obtaining thecurrent time of the reference clock generator 113. The processor 160then issues a command for adjusting, e.g., speeding up or slowing down,the voltage controlled oscillator of the reference clock generator 113,based on the disparity between the time obtained from the receiver 180and the current time of the reference clock generator 113.

Networked Remultiplexing

Given the above described operation, the various functions ofremultiplexing may be distributed over a network. For example, multipleremultiplexer nodes 100 may be interconnected to each other by variouscommunication links, the adaptor 110, and interfaces 140 and 150. Eachof these remultiplexer nodes 100 may be controlled by the controller 20(FIG. 1) to act in concert as a single remultiplexer 30.

Such a network distributed remultiplexer 30 may be desirable as a matterof convenience or flexibility. For example, one remultiplexer node 100may be connected to multiple file servers or storage devices 40 (FIG.1). A second remultiplexer node 100 may be connected to multiple otherinput sources, such as cameras, or demodulators/receivers. Otherremultiplexer nodes 100 may each be connected to one or moretransmitters/modulators or recorders. Alternatively, remultiplexer nodes100 may be connected to provide redundant functionality and thereforefault tolerance in the event one remultiplexer node 100 fails or ispurposely taken out of service.

Consider a first network remultiplexer 30′ shown in FIG. 3. In thisscenario, multiple remultiplexer nodes 100′, 100″, 100′″ are connectedto each other via an asynchronous network, such as a 100 BASE-TXEthernet network. Each of the first two remultiplexer nodes 100′, 100″receives four TSs TS10-TS13 or TS14-TS17 and produces a singleremultiplexed output TS TS18 or TS19. The third remultiplexer 100′″receives the TSs TS18 and TS19 and produces the output remultiplexed TSTS20. In the example shown in FIG. 3, the remultiplexer node 100′receives real-time transmitted TSs TS10-TS13 from a demodulator/receivervia its adaptor 110 (FIG. 2). On the other hand, the remultiplexer 100″receives previously stored TSs TS14-TS17 from a storage device via asynchronous interface 150 (FIG. 2). Each of the remultiplexer nodes 100′and 100″ transmits its respective outputted remultiplexed TS, i.e., TS18or TS19, to the remultiplexer node 100′″ via an asynchronous (100BASE-TX Ethernet) interface 140 (FIG. 2) to an asynchronous (100 BASE-TXEthernet) interface 140 (FIG. 2) of the remultiplexer node 100′″.Advantageously, each of the remultiplexer nodes 100′ and 100″ use theabove-described assisted output timing technique to minimize thevariations in the end-to-end delays caused by such communication. In anyevent, the remultiplexer node 100′″ uses the Re-timing of un-timed datatechnique described above to estimate the bit rate of each program inTS18 and TS19 and to dejitter TS18 and TS19.

Optionally, a bursty device 200 may also be included on at least onecommunication link of the system 30′. For example, the communicationmedium may be shared with other terminals that perform ordinary dataprocessing, as in a LAN. However, bursty devices 200 may also beprovided for purposes of injecting and/or extracting data into the TSs,e.g., the TS20. For example, the bursty device 200 may be a server thatprovides internet access, a web server a web terminal, etc.

Of course, this is simply one example of a network distributedremultiplexer. Other configurations are possible. For example, thecommunication protocol of the network in which the nodes are connectedmay be ATM, DS3, etc.

Two important properties of the network distributed remultiplexer 30′should be noted. First, in the particular network shown, any input portcan receive data, such as bursty data or TS data, from any output port.That is, the remultiplexer node 100′ can receive data from theremultiplexer nodes 100″ or 100′″ or the bursty device 200, theremultiplexer node 100″ can receive data from the remultiplexer nodes100′ or 100′″ or the bursty device 200, the remultiplexer node 100′″ canreceive data from any of the remultiplexer nodes 100′ or 100″ or thebursty device 200 and the bursty device 200 can receive data from any ofthe remultiplexer nodes 100′, 100″ or 100′″. Second, a remultiplexernode that performs data extraction and discarding, i.e., theremultiplexer node 100′″ can receive data from more than one source,namely, the remultiplexer nodes 100′ or 100″ or the bursty device 200,on the same communication link.

As a consequence of these two properties, the “signal flow pattern” ofthe transport packets from source nodes to destination nodes within theremultiplexer is independent of the network topology in which the nodesare connected. In other words, the node and communication link pathtraversed by transport packets in the network distributed remultiplexer30′ does not depend on the precise physical connection of the nodes bycommunication links. Thus, a very general network topology may beused—remultiplexer nodes 100 may be connected in a somewhat arbitrarytopology (bus, ring, chain, tree, star, etc.) yet still be able toremultiplex TSs to achieve virtually any kind of node to node signalflow pattern. For example, the nodes 100′, 100″, 100′″ and 200 areconnected in a bus topology. Yet any of the following signal flowpatterns for transmitted data (e.g., TSs) can be achieved: from node100′ to node 100″ and then to node 100′″; from each of node 100′ and100′″ in parallel to node 200; from nodes 200 and 100′, in parallel tonode 100″ and then from node 100″ to node 100′″, etc. In this kind oftransmission, time division multiplexing may be necessary to interleavesignal flows between different sets of communicating nodes. For example,in the signal flow illustrated in FIG. 3, TS18 and TS19 are timedivision multiplexed on the shared communications medium.

The above discussion is intended to be merely illustrative of theinvention. Those having ordinary skill in the art may devise numerousalternative embodiments without departing from the spirit and scope ofthe following claims.

The claimed invention is:
 1. A method for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said method comprising the steps of: (a) receiving a transport packet from a particular input port, (b) allocating an unused descriptor to said received transport packet, (c) recording a receipt time stamp in said allocated descriptor indicating a time at which said transport packet was received, and (d) scheduling transmission of said received transport packet according to said receipt time stamp and an internal buffering delay between receipt of said transport packet and output of said transport packet, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 2. A method for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said method comprising the steps of: (a) receiving a transport packet from a particular input port, (b) allocating an unused descriptor to said received transport packet, (c) recording a receipt time stamp in said allocated descriptor indicating a time at which said transport packet was received, (d) examining each descriptor in said receipt queue, (e) allocating a descriptor of a transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any (g) assigning a dispatch time to said allocated descriptor of said transmit queue, and (h) ordering said descriptors of said transmit queue in order of increasing dispatch time, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 3. The method of claim 2 further comprising the steps of: (i) transmitting each transport packet, to which a corresponding descriptor in said transmit queue points, from said output port in a time slot of an outputted transport stream corresponding to said dispatch time assigned to said corresponding descriptor.
 4. A method for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said method comprising the steps of: (a) sequentially retrieving each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, and (b) at a time corresponding to a dispatch time recorded in each retrieved descriptor, transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved descriptor, wherein said descriptor containing said dispatch time is a separate data structure not transmitted with said retrieved transport packet.
 5. A method for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said method comprising the steps of: (a) sequentially retrieving each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, (b) at a time corresponding to a dispatch time recorded in each retrieved descriptor, transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved, (c) examining each descriptor in one or more queues of descriptors pointing to to-be-outputted transport packets, (d) allocating a descriptor of said transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any (e) assigning a dispatch time to said allocated descriptor of said transmit queue, and (f) ordering said descriptors of said transmit queue in order of increasing dispatch time.
 6. A remultiplexer for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized and remultiplexer comprising: a cache, a data link control circuit connected to said cache for receiving a transport packet from a particular input port, for allocating an unused descriptor of said cache to said received time at which said transport packet was received, and a processor for scheduling transmission of said received transport packet according to said receipt time stamp and an internal buffering delay between receipt of said transport packet and output of said transport packet, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 7. A remultiplexer for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized and remultiplexer comprising: a cache, a data link control circuit connected to said cache for receiving a transport packet from a particular input port, for allocating an unused descriptor of said cache to said received time at which said transport packet was received, and a processor for examining each descriptor in said receipt queue, for allocating a descriptor of a transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any, for assigning a dispatch time to said allocated descriptor of said transmit queue, and for ordering said descriptors of said transmit queue in order of increasing dispatch time, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 8. The method of claim 7 further comprising: a second data link control circuit for transmitting each transport packet, to which a corresponding descriptor in said transmit queue points, from said output port in a time slot of an outputted transport stream corresponding to said dispatch time assigned to said corresponding descriptor.
 9. A remultiplexer for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said remultiplexer comprising: a cache, and a data link control circuit connected to said cache for sequentially retrieving from said cache each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, and, at a time corresponding to a dispatch time recorded in each retrieved descriptor, for transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved descriptor, wherein said descriptor containing said dispatch time is a separate data structure not transmitted with said retrieved transport packet.
 10. A remultiplexer for remultiplexing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said remultiplexer comprising: a cache, a data link control circuit connected to said cache for sequentially retrieving from said cache each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, and, at a time corresponding to a dispatch time recorded in each retrieved descriptor, for transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved descriptor; a processor for examining each descriptor in one or more queues of descriptors pointing to to-be-outputted transport packets, for allocating a descriptor of said transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any, for assigning a dispatch time to said allocated descriptor of said transmit queue, and for ordering said description of said transmit queue in order of increasing dispatch time.
 11. A transport stream containing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said transport stream being produced by the steps of: (a) sequentially retrieving each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, and (b) at a time corresponding to a dispatch time recorded in each retrieved descriptor, transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved descriptor, wherein said descriptor containing said dispatch time is a separate data structure not transmitted with said retrieved transport packet.
 12. A transport stream containing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said transport stream being produced by the steps of: (a) receiving a transport packet from a particular input port, (b) allocating an unused descriptor to said received transport packet, (c) recording a receipt time stamp in said allocated descriptor indicating a time at which said transport packet was received, and (d) scheduling transmission of said received transport packet according to said receipt time stamp and an internal buffering delay between receipt of said transport packet and output of said transport packet, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 13. A transport steam containing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said transport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said transport stream being produced by the steps of: (a) receiving a transport packet from a particular input port, (b) allocating an unused descriptor to said received transport packet, (c) recording a receipt time stamp in said allocated descriptor indicating a time at which said transport packet was received, (d) examining each descriptor in said receipt queue, (e) allocating a descriptor of a transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any (g) assigning a dispatch time to said allocated descriptor of said transmit queue, and (h) ordering said descriptors of said transmit queue in order of increasing dispatch time, wherein said allocated descriptors are maintained in a receipt queue associated with said input port in order of receipt from said particular input port.
 14. The transport stream of claim 13 produced by the further steps of: (i) transmitting each transport packet, to which a corresponding descriptor in said transmit queue points, from said output port in a time slot of an outputted transport stream corresponding to said dispatch time assigned to said corresponding descriptor.
 15. A transport steam containing transport packets, including transport packets containing compressed data for one or more video programs, each of said video programs for which said sport packets contain compressed data comprising a constant end-to-end communication delay requirement, an independent bit rate and program clock reference time stamps of an independent encoder system time clock to which decoding and presentation of said video program is synchronized, said transport stream being produced by the steps of: (a) sequentially retrieving each descriptor from a queue of transmit descriptors, and a transport packet to which each retrieved descriptor points, (b) at a time corresponding to a dispatch time recorded in each retrieved descriptor, transmitting said retrieved transport packet to which said retrieved descriptor points in a time slot of an outputted transport stream corresponding to said dispatch time recorded in said retrieved, (c) examining each descriptor in one or more queues of descriptors pointing to to-be-outputted transport packet, (d) allocating a descriptor of said transmit queue associated with an output port from which a transport packet pointed to by each examined descriptor is to be transmitted, if any (e) assigning a dispatch time to said allocated descriptor of said transmit queue, and (f) ordering said descriptors of said transmit queue in order of increasing dispatch time. 